pip funktioniert nicht mehr auf meinem Ubuntu-Server und gibt den folgenden Fehler aus, wenn ich versuche, etwas herunterzuladen.
$ 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
Alle der folgenden funktionieren auch nicht
$ Sudo pip install --upgrade pip
$ Sudo apt-get install build-essential
Mein /etc/environment
hat die folgenden Einstellungen, die zuvor funktionierten.
http_proxy="http://myproxyhere:portnumberhere/"
HTTP_PROXY="http://myproxyhere:portnumberhere/"
Mein /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
Hat jemand eine Idee, was schief gehen könnte?
Sie müssen Pypi über HTTPS abrufen, nicht über HTTP.
Aus irgendeinem Grund ist Ihr Pip so konfiguriert, dass er von http://pypi.python.org/simple/ und nicht von https://pypi.python.org/simple/ abruft
Antwort: upgrade pip.
Ich hatte Version 1.1 installiert. Mit Sudo pip install --upgrade pip
Ich habe Version 8.1.2 und das gewünschte Paket richtig installiert.
Sie verwenden keine https-Verbindungen, die seit Ende 2013 verwendet wurden.
Sie können --index-Optionen verwenden, um die Index-URL zu korrigieren. Siehe http://pip.readthedocs.org/en/latest/reference/pip_wheel.html#index-url
pip
Sudo pip install --upgrade pip -i https://pypi.python.org/simple
dann können Sie pip
verwenden als:
Sudo pip install SQLAlchemy
-i
Sudo pip install SQLAlchemy -i https://pypi.python.org/simple
Sie können eine bestimmte Index-URL mit -i
Übergeben:
Sudo pip install SQLAlchemy -i https://pypi.python.org/simple
Obwohl es eine alte Frage ist, kann meine Lösung jemandem helfen.
pip install SQLAlchemy --extra-index-url=https://pypi.python.org/simple/
Das funktioniert bei mir.
Warum versuchst du nicht, Pip im Superuser zu installieren? Geben Sie su und Ihr Passwort ein und versuchen Sie es mit Sudo pip install SQLAlchemy