windows下pip安装速度缓慢解决方案

在windows下使用anaconda配置虚拟环境时,发现pip速度实在是太太太慢了!!

在这里插入图片描述

解决方案与ubuntu下一样,换源即可

解决方案

法一

直接在在cmd中输入命令即可,例如换成阿里云源:

pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/

其他参考的国内源:

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

法二

首先在user目录中创建名字为pip的目录,如在我的user目录下创建pip目录:
在这里插入图片描述

然后进入pip目录,新建一个文件:pip.ini
在这里插入图片描述
使用记事本打开这个文件,并写入以下内容:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com

然后就可以感受飞一样的速度了。

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42301220/article/details/124621396
今日推荐