加速pip下载python库速度

1、打开电脑,在地址栏输入:%APPDATA%
在这里插入图片描述
2.新建一个pip文件夹
在这里插入图片描述
3.在pip文件夹下新建一个pip配置文件并输入以下内容并保存
在这里插入图片描述

[global]
timeout = 6000    #设置超时时间
index-url = https://pypi.tuna.tsinghua.edu.cn/simple  #这里的url换成国内的镜像源
trusted-host = pypi.tuna.tsinghua.edu.cn   #这里的换成国内的镜像源

4.测试下载速度明显加快
在这里插入图片描述
notes:

豆瓣 :http://pypi.douban.com/simple/ 
阿里 :http://mirrors.aliyun.com/pypi/simple/ 
中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/simple
清华:https://pypi.tuna.tsinghua.edu.cn/simple
发布了37 篇原创文章 · 获赞 13 · 访问量 4532

猜你喜欢

转载自blog.csdn.net/qq_42836388/article/details/105317924
今日推荐