Anaconda
查看当前下载源:
conda config --show
channels是默认defaults,也就是下面的repo.anaconda.com/XX
永久清华源:
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 config
后可以在"C:\Users$你的用户名"(注:比如你的电脑叫小黄,此处就应为C:\Users\小黄)下面找到.condarc文件:
如果没有找到需要设置:显示隐藏的项目
可以看到当前channels
还原下载源
conda config --remove-key channels
删除全部源
也可以使用
conda config --remove-key channels XXX
移除指定的链接
pip
暂时清华源:
-i https://pypi.tuna.tsinghua.edu.cn/simple/
永久清华源:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple