python - pip 安装 treq 失败

标签 python http twisted pip

根据 http://treq.readthedocs.org/en/latest/ , treq 可以使用 pip 安装,但是它失败了。我可以使用 tar 文件安装 treq,但我想知道为什么自 http://pypi.python.org/simple/treq/ 以来失败了有 0.1.0 和 0.2.0。

$ sudo pip install treq
Downloading/unpacking treq
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement treq
No distributions at all found for treq
Storing complete log in <cut>.pip/pip.log
$ pip search treq
megrok.strictrequire      - Checks that all grokked "view-like" components
                            require a permission.
streql                    - Constant-time string comparison
trequests                 - A Tornado async HTTP/HTTPS client adaptor for
                            python-requests
treq                      - A requests-like API built on top of twisted.web's
                            Agent
repoze.bfg.restrequest    - a REST aware Request for implementing RESTful
                            applications with repoze.bfg

$

刚刚尝试从 tarfile 安装,但也找不到 twisted,所以想知道 pip 是否存在基本问题...

$ sudo python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
<snip>
Extracting treq-0.2.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding treq 0.2.0 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/treq-0.2.0-py2.7.egg
Processing dependencies for treq==0.2.0
Searching for Twisted>=12.1.0
Reading http://pypi.python.org/simple/Twisted/
Download error on http://pypi.python.org/simple/Twisted/: timed out -- Some packages      may not be found!
Reading http://pypi.python.org/simple/Twisted/
Download error on http://pypi.python.org/simple/Twisted/: timed out -- Some packages     may not be found!
Couldn't find index page for 'Twisted' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error on http://pypi.python.org/simple/: timed out -- Some packages may not be found!
No local packages or download links found for Twisted>=12.1.0
error: Could not find suitable distribution for Requirement.parse('Twisted>=12.1.0')
$

最佳答案

错误信息如下:

Download error on http://pypi.python.org/simple/Twisted/: timed out -- Some packages may not be found!

您是否检查过阻止访问 PyPI 的防火墙?

关于python - pip 安装 treq 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19938937/

相关文章:

http - 什么时候发送 "if-none-match"请求?

http - Network/Golang - "GET"请求剖析

python字典根据值降序排序

python - 如何从主函数中获取某个函数的局部占位符?

python - 遵循层次结构的多个嵌套字典

ruby - 如何在 Rails 中发出异步 http 请求

python - Twisted 中插件和应用程序插件的区别?

python - 没有名为 'Twisted' 的模块

mysql - 使用带有扭曲的 adbapi 和 scrapy 的 mysql 进行异常处理

python - 实现luigi动态图配置