美文网首页
使用国内镜像源来加速python pypi包的安装

使用国内镜像源来加速python pypi包的安装

作者: 西漠 | 来源:发表于2017-12-21 00:43 被阅读23次

pipy国内镜像目前有:

(实测:清华大学的源非常快)
如果想手动指定源,可以在pip后面跟-i 来指定源,比如用清华大学的源来安装web.py框架:

pip install web.py -i [https://pypi.tuna.tsinghua.edu.cn/simple/](https://pypi.tuna.tsinghua.edu.cn/simple/)

要配制成默认的话,需要创建或修改配置文件(linux的文件在~/.pip/pip.conf,windows在%HOMEPATH%\pip\pip.ini),修改内容为:

code:

[global]

index-url = [https://pypi.tuna.tsinghua.edu.cn/simple/](https://pypi.tuna.tsinghua.edu.cn/simple/)

这样在使用pip来安装时,会默认调用该镜像。

更多配置参数见:http://www.pip-installer.org/en/latest/configuration.html

[1] 使用国内镜像源来加速python pypi包的安装

相关文章

网友评论

      本文标题:使用国内镜像源来加速python pypi包的安装

      本文链接:https://www.haomeiwen.com/subject/gurmbxtx.html