第一种方式-

pip config set global.index-url 修改python包pip下载国内源https://mirrors.aliyun.com/pypi/simple/

附国内常用镜像源:
阿里云:修改python包pip下载国内源https://mirrors.aliyun.com/pypi/simple/
中国科技大学:修改python包pip下载国内源https://pypi.mirrors.ustc.edu.cn/simple/
清华大学:修改python包pip下载国内源https://pypi.tuna.tsinghua.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/
原始 https://pypi.python.org/simple

第二种方式-

在Linux系统中,修改~/.pip/pip.conf文件;在Windows系统中,修改C:\Users\XXX\pip\pip.ini文件。如果没有上述文件,需要手动建立。
在文件中输入以下内容:

[global]
index-url = 修改python包pip下载国内源https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.ustc.edu.cn
 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
  • 2021-12-03
  • 2021-07-04
  • 2021-12-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-01-13
  • 2021-11-29
相关资源
相似解决方案