PIP下载安装包失败、超级慢的解决方案

一、下载源地址修改,用国内镜像站点:

国内源:

新版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/

临时使用:

可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple

 引用来自:https://www.cnblogs.com/wdz1226/p/10532941.html

二、Pycharm中修改:

三、Python环境中文件中修改:

..\Lib\site-packages\pip_internal\models\index.py
里面将PYPI的值改为你所需要的源即可,例如改为清华的源。
PyPI = PackageIndex(
‘https://pypi.tuna.tsinghua.edu.cn/simple’, file_storage_domain=‘files.pythonhosted.org’
)

原文地址:https://www.cnblogs.com/JercanYu/p/14341328.html