nowgood

下面以 Anaconda2 安装为例, 说明如何更加流畅的使用 Conda

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。

分类:

技术点:

相关文章:

  • 2021-12-03
  • 2021-07-19
  • 2021-12-10
  • 2021-12-26
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-18
  • 2021-10-10
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案