相关文章推荐
小胡子的皮带  ·  C# 中的ushort - CSDN文库·  1 月前    · 
星星上的热带鱼  ·  theme = ...·  2 周前    · 
好帅的冲锋衣  ·  ModuleNotFoundError: ...·  3 天前    · 
儒雅的遥控器  ·  reactor netty access ...·  10 月前    · 
会开车的火龙果  ·  c# validate email ...·  11 月前    · 

Install Anaconda2

安装 Anaconda2(从清华源下载比较快)

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

配置Conda下载源为清华源

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

配置 conda 之后一定要配置 pip, 下载速度用过的都知道:)

pip 配置

pypi 镜像使用帮助

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple XXX
注意,simple 不能少, 是 https 而不是 http

 ~/.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) (没有就创建一个)

修改 index-url至tuna,例如

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

pip 和 pip3 并存时,只需修改 ~/.pip/pip.conf。