Python pip国内镜像配置

我的未来我决定 提交于 2020-01-02 12:04:47

pip国内镜像配置

一、官方源

https://pypi.python.org/simple

二、国内镜像源

阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple
中国科学院 http://pypi.mirrors.opencas.cn/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

三、添加软件源

  1. 单次安装时生效
pip install 安装包 -i https://pypi.mirrors.ustc.edu.cn/simple/
  1. 全局生效
    在c:/user/xx 下新建名为pip的文件夹,并在其中创建pip.ini文件,文件中输入
[global]
 index-url = https://pypi.mirrors.ustc.edu.cn/simple/
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!