温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

pip使用国内镜像源

发布时间:2020-10-16 11:05:27 来源:网络 阅读:170 作者:知行知行 栏目:系统运维

常用国内镜像:
(1)阿里云 http://mirrors.aliyun.com/pypi/simple/
(2)豆瓣http://pypi.douban.com/simple/
(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
(5)华中科技大学http://pypi.hustunique.com/
方法一:临时使用
加参数-i和镜像地址
例如:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple scrapy
方法二:永久修改
linux:
修改:pip.conf没有创建一个文件夹及文件。文件夹要加".",表示是隐藏文件夹
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
windows:
直接在用户目录中创建一个pip目录,如:c:\user\xx\pip,然后新建文件pip.ini,内容:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI