疑难杂症汇总(私人笔记)

pip下载速度太慢
这是由于pip默认的镜像站太慢了,可以修改为国内的镜像站,国内比较好用的镜像站如下:
清华: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/
修改pip的配置文件,添加国内的镜像站即可。linux下的配置文件为~/.pip/pip.conf,windows系统为C:\Users\xx\pip\pip.ini,xx为用户名。如果目录不存在,则新建即可。之后再配置文件中添加如下内容:

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

conda下载速度太慢
这是由于conda默认的镜像站太慢了,配置一下conda的镜像库即可,例如添加清华tuna镜像站,执行下面的命令即可:

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

猜你喜欢

转载自www.cnblogs.com/jiaxblog/p/9782428.html
今日推荐