Replacement of various mirror sources

Replacement of various mirror sources

Raspberry Pi

It is a Raspberry Pi 3B-PLUS board

Raspberry Pi version information is confirmed

Several ways to view version information of Raspberry Pi:

  • uname -a

    Linux raspberrypi 4.19.57-v7+ #< span style="color: #800080;">1244 SMP Thu Jul 4 18< /span>:45:25 BST 2019 armv7l GNU/Linux

  • lsb_release -a

    No LSB modules are available.
    
    Distributor ID: Raspbian
    Description: Raspbian GNU
    /Linux 10 (buster)
    Release:
    10
    Codename: buster

  • Use software to view:

    • Download via command: sudo apt install screenfetch

    • After the download is successful, enter the command screenfetch to view

     .',;:cc;,'. .,;::c :,,. [email protected]
    
    ,ooolcloooo:
    'oooooccloo: OS: Raspbian 10 buster
    .looooc;;:ol :oc;;:ooooo' Kernel: armv7l Linux 4.19 .57-v7+
    ;oooooo: ,ooooooc. Uptime: 11m
    .,:;
    '. .;:; '. Packages: 1446
    .... ..
    '''''. .. .. Shell: 858
    .''. ..'''''. ..''. DE: LXDE
    .. ..... ..... .. WM: OpenBox
    . .
    ''''''' . ''''''.. CPU: ARMv7 rev 4 (v7l) @ 1.4GHz
    .'' .'''''''' .< span style="color: #800000;">'''''''. ''. RAM: 183MiB / 874MiB
    ''' ''''''' .'''''' '''
    .' ........... ... .< /span>'.
    ....
    ''''''''. . ''.
    '''''. ''''''''. . '''''
    '''''. .'''''. .'''''.
    ..''.. .''..
    .
    ‘‘‘‘‘‘‘‘
    ......

Summary< span>:

From the above three methods, we can see that the operating system is Raspbian 10 buster, with this information, you can perform subsequent source changes.

Change source

You can refer to the help of Tsinghua website: https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/

  • Enter the above website;

  • in In the Instructions column, select the version of the Raspberry Pi operating system that was previously queried, for example mine is Debian 10;

    • < p class="md-end-block">Don’t choose the wrong version!

  • Edit/etc/apt/sources.listfile, modify the content to:

    deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/ raspbian/ buster main non-free contrib
    
    deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian /raspbian/ buster main non-free contrib

    Use the original content with #+spaceComment it out

  • Edit the /etc/apt/sources.list.d/raspi.list file and modify the content Is:

    deb http:// mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui

  • After editing the mirror station, use the sudo apt-get update command to update the software source list , And check that the editing just now is correct.

Anaconda change source< /h3>

Refer to the help of Tsinghua Station: https://mirrors.tuna.tsinghua.edu.cn/help/ anaconda/

  • Find the .condarcfile in the user directory:

    • Windows users cannot directly create the name .condarc file, can be executed in Anaconda Prompt conda config --set show_channel_urls yes Generate the file and then modify it

  • Modify its content to:

    channels:
    
    - defaults
    show_channel_urls:
    true
    default_channels:
    - https://mirrors.tuna.tsinghua.edu.cn /anaconda/pkgs/main
    -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs /free
    -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs /r
    custom_channels: # This part of the content needs to be added, and generally does not need to be added
    conda
    -forge: https://mirrors.tuna.tsinghua. edu.cn/anaconda/cloud
    msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud

  • If you want to restore the source, then By entering the command: conda config --remove-key channelsSimply

PIP/PIP3 replacement source

  • Upgrade pip

    It is recommended to upgrade pip to pip3 here. The command used is: python -m pip install --upgrade pip< /p>

Refer to the help of Tsinghua Station: https://mirrors.tuna. tsinghua.edu.cn/help/pypi/

  • For temporary use, recommended

    • The command is pip install -i https://pypi.tuna.tsinghua.edu.cn/simple The name of the package< /span>

  • Permanent:

    • Upgrade pip to the latest version (>=10.0.0) and configure it:

    pip < span style="color: #0000ff;">install pip -U
    
    pip config set global.index
    -url https://pypi. tuna.tsinghua.edu.cn/simple

    • If your network connection to the default source of pip is poor, temporarily use this mirror site to upgrade pip:

    • ul>

      pip install -i https://< /span>pypi.tuna.tsinghua.edu.cn/simple pip -U

    < h3 class="md-end-block md-heading">Reference:

    https ://jingyan.baidu.com/album/ca00d56c144644e99febcf4d.html?picindex=3

    https: //mirrors.tuna.tsinghua.edu.cn/help/AOSP/

    https:// mirrors.tuna.tsinghua.edu.cn/help/raspbian/

    https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/

    https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

    Linux raspberrypi 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45< /span>:25 BST 2019 armv7l GNU/Linux

    No LSB modules are available.
    
    Distributor ID: Raspbian
    Description: Raspbian GNU
    /Linux 10 (buster)
    Release:
    10
    Codename: buster

     .',;:cc;,'. .,;:: c:,,. [email protected]
    
    ,ooolcloooo:
    'oooooccloo: OS: Raspbian 10 buster
    .looooc;;:ol :oc;;:ooooo' Kernel: armv7l Linux 4.19 .57-v7+
    ;oooooo: ,ooooooc. Uptime: 11m
    .,:;
    '. .;:; '. Packages: 1446
    .... ..
    '''''. .. .. Shell: 858
    .''. ..'''''. ..''. DE: LXDE
    .. ..... ..... .. WM: OpenBox
    . .
    ''''''' . ''''''.. CPU: ARMv7 rev 4 (v7l) @ 1.4GHz
    .'' .'''''''' .< span style="color: #800000;">'''''''. ''. RAM: 183MiB / 874MiB
    ''' ''''''' .'''''' '''
    .' ........... ... .< /span>'.
    ....
    ''''''''. . ''.
    '''''. ''''''''. . '''''
    '''''. .'''''. .'''''.
    ..''.. .''..
    .
    ‘‘‘‘‘‘‘‘
    ......

    deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib
    
    deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian /raspbian/ buster main non-free contrib

    deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui

    channels:
    
    - defaults
    show_channel_urls:
    true
    default_channels:
    - https://mirrors.tuna.tsinghua.edu.cn /anaconda/pkgs/main
    -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs /free
    -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs /r
    custom_channels: # This part of the content needs to be added, and generally does not need to be added
    conda
    -forge: https://mirrors.tuna.tsinghua. edu.cn/anaconda/cloud
    msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud
    simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/ cloud

    pip install pip -U
    
    pip config set global.index
    -url https://pypi. tuna.tsinghua.edu.cn/simple

    pip install -i https:< span style="color: #008000;">//pypi.tuna.tsinghua.edu.cn/simple pip -U

Leave a Comment

Your email address will not be published.