Windows 下更换pip源
1.找到C:\Users\您的用户名\pip\pip.ini
如果文件不存在,可以自己创建一个
2.添加
[global] index-url = https://mirrors.aliyun.com/pypi/simple/ extra-index-url = https://pypi.tuna.tsinghua.edu.cn/simple/ https://pypi.mirrors.ustc.edu.cn/simple/ https://pypi.mirrors.ustc.edu.cn/simple/ http://pypi.mirrors.ustc.edu.cn/simple/ https://pypi.org/simple/ trusted-host = mirrors.aliyun.com pypi.tuna.tsinghua.edu.cn pypi.mirrors.ustc.edu.cn pypi.mirrors.ustc.edu.cn pypi.mirrors.ustc.edu.cn pypi.org
3. pip config list 查看源是否更改成功
本文来自博客园,作者:变秃了也就变强了,转载请注明原文链接:https://www.cnblogs.com/lichangyi/p/17916214.html