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 查看源是否更改成功

posted @ 2023-12-20 11:46  变秃了也就变强了  阅读(189)  评论(0编辑  收藏  举报