linux
修改
~/.pip/pip.conf
的内容 #没有就自己创建
Windows
user目录下创建pip文件夹,文件夹内新建一个pip.ini的文件,文件内容编辑。# 如:C:\Users\惠普\pip
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
这里使用的是清华的源,如需更换其他源可自行查找。
本文介绍了如何在Linux系统中修改~/.pip/pip.conf文件以使用清华源,以及在Windows用户目录下创建pip.ini文件,内容包括设置全局索引URL为清华源,并指定可信任的阿里云主机。这样可以加快Python包的下载速度。
linux
修改
~/.pip/pip.conf
的内容 #没有就自己创建
Windows
user目录下创建pip文件夹,文件夹内新建一个pip.ini的文件,文件内容编辑。# 如:C:\Users\惠普\pip
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
这里使用的是清华的源,如需更换其他源可自行查找。

被折叠的 条评论
为什么被折叠?