配置pip国内源

来源:互联网 发布:万网现在买域名送xyz 编辑:程序博客网 时间:2024/05/16 04:34

pip官方默认的源由于在国外,安装的时候下载很慢。国内的豆瓣,阿里等源可以使用,速度会快很多

centos下:

编辑~/.pip/pip.conf,如果没有则手动创建:

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


windows下:

编辑C:\Users\用户\pip\pip.ini,如果没有则手动创建:

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

0 0
原创粉丝点击