PIP 下载过程缓慢,国内是否有相关库的镜像,怎么使用镜像呢

  • 2725
请先 登录 后评论

1 个回答

XY - 开发者 @ 学研谷
擅长:LS-DYNA,AUTODYN

PIP 下载可以通过 - i 参数使用临时镜像,使用方法如下:

pip3 install -i 镜像地址 需要下载的库名 

例如:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gevent

其使用清华的镜像去安装 gevent 库。

另外,推荐国内以下的 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/

请先 登录 后评论