V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  Dcatch  ›  全部回复第 3 页 / 共 4 页
回复总数  65
1  2  3  4  
2016-12-13 13:34:30 +08:00
回复了 ansheng 创建的主题 Python pip 安装包时 Read timed out 你们都是怎么解决的?
pip 源更改设置

pipy 国内镜像目前有:

   http://pypi.douban.com/ 豆瓣

   http://pypi.hustunique.com/ 华中理工大学

   http://pypi.sdutlinux.org/ 山东理工大学

   http://pypi.mirrors.ustc.edu.cn/ 中国科学技术大学

手动指定源:

在 pip 后面跟-i 来指定源,比如用豆瓣的源来安装 web.py 框架:

pip install web.py -i http://pypi.douban.com/simple

注意后面要有 /simple 目录!!!

配置文件

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

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
如果不加后面的 install
则需要每次在命令后面加上 --trusted-host
2016-12-13 13:34:05 +08:00
回复了 ansheng 创建的主题 Python pip 安装包时 Read timed out 你们都是怎么解决的?
可以考虑国内的源 豆瓣的就不错 目前一直在用
2016-12-06 15:32:51 +08:00
回复了 fatea 创建的主题 Python 阿里云 pyenv 无法下载 python
遇到相同问题找了半天 大家可以先从搜狐下载 py 的包

http://mirrors.sohu.com/python/
下载完之后直接复制到楼上大大说的目录即可 也可使用下面这句 bash 脚本

v=2.7.9|wget http://mirrors.sohu.com/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/;pyenv install $v

参考出处 https://segmentfault.com/a/1190000006174123
1  2  3  4  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1805 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms · UTC 16:26 · PVG 00:26 · LAX 09:26 · JFK 12:26
Developed with CodeLauncher
♥ Do have faith in what you're doing.