I run sudo pip install git-review
, and get the following messages:
Downloading/unpacking git-review
C
I too used the chosen solution (downgrading pip) to work around this issue until I ran into another seemingly unrelated issue caused by the same underlying problem. Python's version of OpenSSL was out of date. Check your OpenSSL version:
python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
If the version is 0.9.7
, that should verify that OpenSSL needs to be updated. If you know how to do that directly, great (but please let me know in a comment). If not, you can follow the advice in this answer, and reinstall python from the 64 bit/32 bit installer instead of the 32 bit only installer from python.org (I'm using python 3.4.2). I now have OpenSSL version 0.9.8
, and none of these issues.
I added --proxy command line option to point to the proxy and it's working (pip version is 1.5.4 and python 2.7). for some reason it was not taking the shell env variables HTTPS_PROXY, HTTP_PROXY, https_proxy, http_proxy.
sudo pip --proxy [user:passwd@]proxy.server:port install git-review
Check your proxy connection, I had a similar issue, then I changed my connection which wasn't proxied and boom, of it started downloading and setting up the library
in my case I would install django (
pip install django
) and it has a same problem with ssl certificate (Cannot fetch index base URL http://pypi.python.org/simple/ )
it's from virtualenv so DO :
FIRST: delete your virtualenv
deactivate rm -rf env
SECOND: check have pip
pip3 -V
if you don't have
sudo apt-get install python3-pip
FINALLY:
install virtualenv with nosite-packages and make your virenviroment
sudo pip3 install virtualenv virtualenv --no-site-packages -p /usr/bin/python3.6
. env/bin/activate
In case you use a firewall, make sure outbound connections to port 443 are not blocked, e.g. run:
sudo iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
I'm now getting this in $HOME/.pip/pip.log
:
Could not fetch URL https://pypi.python.org/simple/: HTTP Error 403: TLSv1.2+ is required
I don't have a straightforward solution for this, but I'm mentioning it as something to watch out for before you waste time on trying some of the other solutions here.
trusted-host
didn't change anything (dunno where I picked this up)For what it's worth my openssl
is too old to even have ssl.OPENSSL_VERSION
so maybe that's really the explanation here.
In the end, wiping my virtual environment and recreating it with virtualenv --setuptools env
seems to have fixed at least the major blockers.
This is on a really old Debian box, Python 2.6.6.