Python自动化之配置Python模块国内镜像

Linux环境

在~/.pip/pip.conf文件中添加或修改

[global]  
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]  
trusted-host=mirrors.aliyun.com

Windows环境

在C:Users登录用户名称下新建pip文件夹,新建pip.ini文件

[global]  
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]  
trusted-host=mirrors.aliyun.com

友情提示

同步频率为每天一次,每天凌晨2:00-4:00为镜像的同步时间
若使用阿里云服务器,将源的域名从mirrors.aliyun.com改为mirrors.aliyuncs.com,不占用公网流量。
如果需要下载ISO镜像,请直接使用Chrome、Firefox浏览器下载,勿使用P2P下载工具。

原文地址:https://www.cnblogs.com/wspblog/p/5993726.html