Python pip安装treq失败

Python pip安装treq失败,python,http,twisted,pip,Python,Http,Twisted,Pip,据介绍,treq可以使用pip安装,但是它失败了。我可以使用tar文件安装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

据介绍,treq可以使用pip安装,但是它失败了。我可以使用tar文件安装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

$
$sudo pip安装treq
下载/解包treq
无法获取索引基URLhttp://pypi.python.org/simple/
找不到任何满足treq要求的下载
没有找到treq的任何分布
在.pip/pip.log中存储完整的日志
$pip搜索treq
megrok.strictrequire-检查所有grokked“类似视图”的组件
需要许可。
streql-常量时间字符串比较
trequests-一个用于
python请求
treq—一种类似API的请求,构建在twisted.web的基础上
代理人
restze.bfg.restrequest-实现RESTful的REST感知请求
使用repose.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')
$
$sudo python setup.py安装
正在运行的安装
正在检查/usr/local/lib/python2.7/dist-packages中的.pth文件支持/
将treq-0.2.0-py2.7.egg提取到/usr/local/lib/python2.7/dist-packages
将treq 0.2.0添加到easy-install.pth文件
已安装/usr/local/lib/python2.7/dist-packages/treq-0.2.0-py2.7.egg
处理treq==0.2.0的依赖项
搜索Twisted>=12.1.0
阅读http://pypi.python.org/simple/Twisted/
上的下载错误http://pypi.python.org/simple/Twisted/: 超时--可能找不到某些包!
阅读http://pypi.python.org/simple/Twisted/
上的下载错误http://pypi.python.org/simple/Twisted/: 超时--可能找不到某些包!
找不到“Twisted”的索引页(可能拼写错误?)
扫描所有包的索引(这可能需要一段时间)
阅读http://pypi.python.org/simple/
上的下载错误http://pypi.python.org/simple/: 超时--可能找不到某些包!
未找到Twisted>=12.1.0的本地软件包或下载链接
错误:找不到适合需求的分发。解析('Twisted>=12.1.0')
$

错误消息如下:

上的下载错误http://pypi.python.org/simple/Twisted/: 超时--可能找不到某些包


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

错误消息如下:

上的下载错误http://pypi.python.org/simple/Twisted/: 超时--可能找不到某些包


你有没有检查防火墙阻止对PyPI的访问?

了解它的价值:永远不要安装
sudo-pip
。或者使用一些可以让您将东西安装到系统之外的地方的东西,比如
virtualenv
pip install--user
,或者使用一些专为与您的系统集成而设计的东西,比如
pypi install
。感谢您的反馈。我尝试了pypi安装treq,但也没有成功。对我来说效果很好。你确定没有防火墙/防病毒软件阻止它吗?谢谢,是的,这似乎是个问题。这个问题似乎离题了,因为它太本地化了,不值得这么做:永远不要安装
sudo pip
。或者使用一些可以让您将东西安装到系统之外的地方的东西,比如
virtualenv
pip install--user
,或者使用一些专为与您的系统集成而设计的东西,比如
pypi install
。感谢您的反馈。我尝试了pypi安装treq,但也没有成功。对我来说效果很好。你确定没有防火墙/防病毒软件阻止它吗?谢谢,是的,这似乎是个问题。这个问题似乎离题了,因为它太本地化了。我甚至没有想到这一点,因为我可以从电脑的浏览器访问。但是从我试图安装的节点执行wget失败,因此它似乎与防火墙相关。是的,这是一个防火墙问题。设置https\U代理等解决了这个问题。很好的一点,我甚至没有想到这一点,因为我可以从我的电脑浏览器访问。但是从我试图安装的节点执行wget失败,因此它似乎与防火墙相关。是的,这是一个防火墙问题。设置https\u代理等解决了该问题。