码迷,mamicode.com
首页 > 其他好文 > 详细

pip 更换源

时间:2017-09-29 01:53:02      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:tps   conf   更换   成功   pip   targe   alt   href   模块   

pip install 安装模块时有时超级慢,甚至不能安装成功,那么我们可以更换源,如 清华:https://pypi.tuna.tsinghua.edu.cn/simple

 

1、临时使用

pip install -i  https://pypi.tuna.tsinghua.edu.cn/simple  django

2、永久使用

更改配置文

修改 ~/.pip/pip.conf 文件(没有的话自己创建,操作系统是linux)

编辑pip.conf文件,查看内容如下(红色框内为要更换的源)

技术分享

这样再使用一般速度就会快很多了。

pip 更换源

标签:tps   conf   更换   成功   pip   targe   alt   href   模块   

原文地址:http://www.cnblogs.com/liangping/p/7609199.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!