conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config --set show_channel_urls yes
cd ~ mkdir .pip touch pip.conf sudo chmod 755 pip.conf gedit pip.conf
其餘的配置位置:linux
Linux/Unix: /etc/pip.conf ~/.pip/pip.conf ~/.config/pip/pip.conf Mac OSX: ~/Library/Application Support/pip/pip.conf ~/.pip/pip.conf /Library/Application Support/pip/pip.conf Windows: %APPDATA%\pip\pip.ini %HOME%\pip\pip.ini C:\Documents and Settings\All Users\Application Data\PyPA\pip\pip.conf (Windows XP) C:\ProgramData\PyPA\pip\pip.conf (Windows 7及之後)
[global] index-url = http://pypi.douban.com/simple #豆瓣源,能夠換成其餘的源 extra-index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.douban.com #添加豆瓣源爲可信主機,要否則可能報錯 pypi.tuna.tsinghua #清華 timeout = 120
清華:https://pypi.tuna.tsinghua.edu.cn/simple 阿里雲:http://mirrors.aliyun.com/pypi/simple/ 中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/ 華中理工大學:http://pypi.hustunique.com/ 山東理工大學:http://pypi.sdutlinux.org/ 豆瓣:http://pypi.douban.com/simple/
做者:BigJeffWang
連接:https://www.jianshu.com/p/ac4df573b9d9
來源:簡書
簡書著做權歸做者全部,任何形式的轉載都請聯繫做者得到受權並註明出處。阿里雲