首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >PIP找不到任何满足要求的下载SQLAlchemy

PIP找不到任何满足要求的下载SQLAlchemy
EN

Stack Overflow用户
提问于 2014-06-08 04:28:58
回答 7查看 89.6K关注 0票数 23
  • Ubuntu 12.04
  • Apache 2.2.22

pip已经停止在我的ubuntu服务器上工作,并在我尝试下载任何东西时显示以下错误。

代码语言:javascript
复制
$ sudo pip install SQLAlchemy
Downloading/unpacking SQLAlchemy
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement SQLAlchemy
No distributions at all found for SQLAlchemy
Storing complete log in /home/user/.pip/pip.log

下面的所有方法也不起作用

代码语言:javascript
复制
$ sudo pip install --upgrade pip 
$ sudo apt-get install build-essential

我的/etc/environment有以下设置,这些设置以前是有效的。

代码语言:javascript
复制
http_proxy="http://myproxyhere:portnumberhere/"
HTTP_PROXY="http://myproxyhere:portnumberhere/"

我的/home/user/.pip

代码语言:javascript
复制
------------------------------------------------------------
/usr/bin/pip run on Sat Jun  7 20:08:38 2014
Downloading/unpacking SQLAlchemy

  Getting page http://pypi.python.org/simple/SQLAlchemy
  Could not fetch URL http://pypi.python.org/simple/SQLAlchemy: <urlopen error [Errno 111] Connection refused>
  Will skip URL http://pypi.python.org/simple/SQLAlchemy when looking for download links for SQLAlchemy
  Getting page http://pypi.python.org/simple/
  Could not fetch URL http://pypi.python.org/simple/: <urlopen error [Errno 111] Connection refused>
  Will skip URL http://pypi.python.org/simple/ when looking for download links for SQLAlchemy
  Cannot fetch index base URL http://pypi.python.org/simple/

  URLs to search for versions for SQLAlchemy:
  * http://pypi.python.org/simple/SQLAlchemy/
  Getting page http://pypi.python.org/simple/SQLAlchemy/
  Could not fetch URL http://pypi.python.org/simple/SQLAlchemy/: <urlopen error [Errno 111] Connection refused>
  Will skip URL http://pypi.python.org/simple/SQLAlchemy/ when looking for download links for SQLAlchemy
  Could not find any downloads that satisfy the requirement SQLAlchemy

No distributions at all found for SQLAlchemy

Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 948, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 152, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for SQLAlchemy

有没有人知道可能出了什么问题?

EN

回答 7

Stack Overflow用户

回答已采纳

发布于 2014-06-10 19:20:07

您需要通过HTTPS获取pypi,而不是HTTP。

由于某些原因,您的pip被配置为从http://pypi.python.org/simple/而不是https://pypi.python.org/simple/检索

票数 11
EN

Stack Overflow用户

发布于 2016-06-09 04:38:42

答案:升级pip。

我安装了1.1版。使用sudo pip install --upgrade pip,我得到了8.1.2版本和我想要正确安装的包。

票数 27
EN

Stack Overflow用户

发布于 2017-11-22 02:47:29

解决方案1:升级pip

代码语言:javascript
复制
sudo pip install --upgrade pip -i https://pypi.python.org/simple

然后,您可以像这样使用pip

代码语言:javascript
复制
sudo pip install SQLAlchemy

解决方案2:使用-i指定索引URL

代码语言:javascript
复制
sudo pip install SQLAlchemy -i https://pypi.python.org/simple
票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24101300

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档