pip使用国内源的配置方法

可以直接在 pip 命令中使用 -i 参数来指定镜像地址,例如:

pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple

配置文件 ~/.pip/pip.conf:

[global]
index-url = https://pypi.douban.com/simple
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
posted @ 2019-02-16 15:32  wshenJin  阅读(252)  评论(0编辑  收藏  举报