Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/

I run sudo pip install git-review, and get the following messages:

Downloading/unpacking git-review   Cannot fetch index base URL http://pypi.python.org/simple/   Could not find any downloads that satisfy the requirement git-review No distributions at all found for git-review Storing complete log in /home/sai/.pip/pip.log 

Does anyone has any idea about this?

like image 761
Sai Wai Maung Avatar asked Jan 22 '14 22:01

Sai Wai Maung


People also ask

What is https PYPI Python org simple?

pypi-simple is a client library for the Python Simple Repository API as specified in PEP 503 and updated by PEP 592, PEP 629, PEP 658, and PEP 691.

What is the latest version of PIP?

pip 22.2.2. The PyPA recommended tool for installing Python packages.

Could not find a version that satisfies the requirement PIP?

Solution 1: Just update pip You just need to update pip and your error will be resolve. Just follow this command. If you are windows users Then run this command. And then also upgrade setuptools after doing the above.


2 Answers

I know this is an old thread, but I encountered this issue today and wanted to share my solution to the problem because I haven't seen this solution elsewhere on SO.

My environment: Python 2.7.12/2.7.14 on Ubuntu 12.04.5 LTS in a virtualenv, pip version 1.1.

My Errors:

pip install nose 

in console:

Cannot fetch index base URL http://pypi.python.org/simple/ 

in ~/.pip/pip.log:

Could not fetch URL http://pypi.python.org/simple/: HTTP Error 403: SSL is required 

Curious for me because I had been running these same commands in a script without issue for about a year.

this fixed it:

pip install --index-url=https://pypi.python.org/simple/ nose 

(note the https)

Hope this helps someone!

like image 167
mattdedek Avatar answered Sep 20 '22 12:09

mattdedek


You need to upgrade your pip installation because it is still using http instead of https.

The --index-url (short version: -i) option allows you to specify an index-url in the call to pip itself, there you can use the https-variant. Then you can instruct pip to upgrade itself.

sudo pip install --index-url https://pypi.python.org/simple/ --upgrade pip

Afterwards you should be able to use pip without the --index-url option.


I believe that the release 7.0.0 (2015-05-21) triggered this issue. The release note for that version states the following:

BACKWARD INCOMPATIBLE No longer implicitly support an insecure origin origin, and instead require insecure origins be explicitly trusted with the --trusted-host option.

You can check your pip version with pip --version.

This would mean that issuing sudo pip install --trusted-host --upgrade pip once would also solve this issue, albeit download pip over insecure http. This might also not work at all, because it is possible that the insecure endpoint is no longer accessible on the server (I have not tested this).

like image 33
Daniel F Avatar answered Sep 20 '22 12:09

Daniel F