【Python】Python3.7.4中pip配置国内镜像源

1.国内镜像源列表

(1)阿里云 https://mirrors.aliyun.com/pypi/simple/
(2)豆瓣 https://pypi.douban.com/simple/
(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple/
(5)华中科技大学 https://pypi.hustunique.com/

2.配置步骤

首先路径%HOMEPATH%,直接将该环境变量放到资源搜索框即可

进入到目录后查看是否存在文件夹pip,没有的话新建文件夹pip,并且在pip文件夹内新建pip.ini文件,文件内容如下:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn # trusted-host 此参数是为了避免麻烦,否则使用的时候可能会提示不受信任

3.查看是否配置成功

出现下图表示已经成功配置源

原文地址:https://www.cnblogs.com/OliverQin/p/13093258.html