在学习python的时候安装库,因为网络的问题便出现这个问题如图,

image

经过百度得知要切换镜像源

使用如下代码

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

又出现新的问题

image

继续查找问题得知需要先切换到pip.exe所在的目录再进行切换镜像源

假设我的pip.exe在C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts这个地方
所以要先执行

cd C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts

北落燕门
3 声望1 粉丝

人是铁,饭是钢