The following takes Anaconda2 installation as an example to illustrate how to use Conda more smoothly
Install Anaconda2
Install Anaconda2 (download from Tsinghua source is faster)
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda2-5.1.0-Linux-x86_64.sh
bash Anaconda2-5.1.0-Linux-x86_64.sh
Configure the Conda download source as Tsinghua source
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 --set show_channel_urls yes
After configuring conda, you must configure pip, and everyone who has used the download speed knows :)
pip configure
pypi mirror usage help
temporary use
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple XXX
Note that simple cannot be missing, it is https instead of http
set as Default
Revise
~/.config/pip/pip.conf (Linux)
%APPDATA%\pip\pip.ini (Windows 10)
windows 修改没法使用的原因是, 隐藏了 txt 拓展名,
创建的骑士是 pip.ini.txt, 点击"查看"->勾选"文件扩展名", 将文件名修改为 pip.ini 即可
$HOME/Library/Application Support/pip/pip.conf (macOS) (没有就创建一个)
Modify index-url to tuna, for example
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
pip 和 pip3 并存时,只需修改 ~/.pip/pip.conf。