使用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/
在install 后面 加上-i 源地址 最后加上你要下载的插件名
pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ filename
如果你想永久使用
Linux下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)
windows下,直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini
内容如下:
[global]
index-url =
https://pypi.mirrors.ustc.edu.cn/simple/
[install]
trusted-host=
mirrors.ustc.edu.cn