Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

ubuntu - PIP Could not find any downloads that satisfy the requirement SQLAlchemy

  • Ubuntu 12.04
  • Apache 2.2.22

pip has stopped working on my ubuntu server and gives the below error when I try to download anything.

$ 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

All of the below also do not work

$ sudo pip install --upgrade pip 
$ sudo apt-get install build-essential

My /etc/environment has the below settings which were working previously.

http_proxy="http://myproxyhere:portnumberhere/"
HTTP_PROXY="http://myproxyhere:portnumberhere/"

My /home/user/.pip

------------------------------------------------------------
/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

Has anyone got any idea what might be going wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Answer: upgrade pip.

I had version 1.1 installed. With sudo pip install --upgrade pip I got version 8.1.2 and the package I wanted installed properly.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...