常用国内镜像源及“ Read timed out.”解决

常用国内镜像源及“ Read timed out.”解决

常用镜像地址
  • 清华大学镜像站 https://mirror.tuna.tsinghua.edu.cn/
  • 阿里云镜像站 https://developer.aliyun.com/mirror/
  • 网易云镜像站 http://mirrors.163.com/
  • 华中科技大镜像站 http://mirror.hust.edu.cn/
  • 北京交通大学镜像站 https://mirror.bjtu.edu.cn/
  • 中国科学技术大学镜像站 https://mirror.bjtu.edu.cn/
  • 搜狐镜像站 http://mirrors.sohu.com/
  • 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
  • 华中理工大学:http://pypi.hustunique.com/
  • 山东理工大学:http://pypi.sdutlinux.org/
  • 豆瓣:http://pypi.douban.com/simple/
  • 兰州大学:http://mirror.lzu.edu.cn/

使用举例:
pip install -i https://mirrors.aliyun.com/pypi/simple/ simpleui

解决Read timed out

报错信息

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
  1. 解决方式1

    pip --default-timeout=1000 install -U +包名

#举例
pip --default-timeout=1000 install -U djangorestframework
  1. 解决方式2

    终端输入以下语句后,接着执行pip就OK了

pip --default-timeout=100 install gevent

你可能感兴趣的:(python)