ubuntu 下修改pip镜像源

mac2024-09-30  76

在home/用户名/目录下创建.pip文件夹然后cd .pip创建pip.conf文件touch pip.conf

输入以下内容然后保存即可

[global] timeout = 6000 index-url = http://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com

上面是更换为阿里源,其他源也是一样,比如中科大就替换相应内容如下shell index-url=http://pypi.mirrors.ustc.edu.cn/simple/ trusted-host =pypi.mirrors.ustc.edu.cn

 

最新回复(0)