新版ubuntu要求使用https源,要注意。
清华: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/linux
直接在user目录中建立一个pip目录,如:C:\Users\xx\pip,新建文件pip.iniubuntu
文件内容为:阿里云
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
以清华源为例url
在用户家目录下的 .pip 目录下建立一个 pip.conf 文件 , 若是没有 .pip 目录自行建立。spa
mkdir ~/.pip cd ~/.pip touch pip.conf #编辑pip.conf文件 sudo gedit ~/.pip/pip.conf
将如下文件复制到 pip.conf 内code
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=pypi.tuna.tsinghua.edu.cn
以清华源为例blog