Anaconda中pip安装第三方库速度慢解决方法
Windows10系统 + 安装了Anaconda
初学python,使用Anaconda安装第三方库,其中使用pip安装速度慢
使用网上的方法在C:\Users\用户名>文件夹下新建一个pip.ini文件写入
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
然后返回cmd,dos界面下pip安装依然很慢
在网上搜的解决方法都不行,一顿百度输入
但是其中一行代码运行结果可以发现,应该是文件放错位置
C:\Users\cww>pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple";
Writing to C:\Users\cww\AppData\Roaming\pip\pip.ini
从上面提示可以发现 pip.ini的位置应该是C:\Users\cww\AppData\Roaming\pip
所以切换到该文件夹下,新建一个pip.ini并写入
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
之后在dos界面下,使用pip安装速度正常。
注意:pip.ini位置要注意,不然配置好了镜像,pip也读取不到。
系统:win10+anaconda