Ubuntu pip使用国内镜像,加速安装

xiaoxiao2021-02-28  159

国内源:

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

豆瓣:http://pypi.douban.com/simple/

创建文件 ~/.pip/pip.conf (文件夹要加“.”,表示是隐藏文件夹) 打开文件编辑,内容如下:

[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=mirrors.aliyun.com

其中的源可以替换为上述列出的任意

转载请注明原文地址: https://www.6miu.com/read-22663.html

最新回复(0)