Python configuration Alibaba source method

Conda configure Ali source:
first win+r and enter cmd to enter the administrator interface

Secondly enter conda config --set show_channel_urls yes to generate the .condarc file

Finally, find the file in the user directory of the c drive and open it for editing. Enter the following code and save it.

channels:

        - defaults

show_channel_urls: true

default_channels:

        - http://mirrors.aliyun.com/anaconda/pkgs/main

        - http://mirrors.aliyun.com/anaconda/pkgs/r

        - http://mirrors.aliyun.com/anaconda/pkgs/msys2

custom_channels:

        conda-forge: http://mirrors.aliyun.com/anaconda/cloud

        msys2: http://mirrors.aliyun.com/anaconda/cloud

        bioconda: http://mirrors.aliyun.com/anaconda/cloud

        menpo: http://mirrors.aliyun.com/anaconda/cloud

        pytorch: http://mirrors.aliyun.com/anaconda/cloud

        simpleitk: http://mirrors.aliyun.com/anaconda/cloud

Finally, enter conda clean -i in the administrator interface to clear the index cache.

python configure Ali source
win+r and enter cmd to enter the administrator interface input

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
 

Guess you like

Origin blog.csdn.net/davice_li/article/details/131747631