4

On an old Ubuntu 8.04 (cannot upgrade yet) I need to create a Python virtualenv, install some packages and then my software.

I do get certificate errors:

Could not fetch URL https://pypi.python.org/simple/xlrd/: connection error:    
[Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate   routines:X509_load_cert_crl_file:system lib     
Will skip URL https://pypi.python.org/simple/xlrd/ when looking for
download links for xlrd

so I cannot upgrade pip or setuptools, and have no luck finding how to update just the certificate (the system is old and cannot be update using apt). The python installed is the latest python-2.7 (I have to use pip-2.7 and virtualenv-2.7 in order not to get the old system versions that I don't want to touch).

How can I install appropriate certificates, or work around this issue?

1

The first thing you should do is use easy_install to downgrade pip:

easy_install-2.7 pip==1.2.1

I also downgraded setuptools to version 3.6, but a later version might work:

easy_install setuptools==3.6

After that you should be able to use pip-2.7 to update things for python-2.7


If you create a virtualenv after that and activate it, you will have the latest version of pip, which again will not install anything:

$ virtualenv-2.7 testvenv
$ source testenv/bin/activate
(testvenv) $ pip --version
pip 1.5.6
(testvenv) $ pip install ruamel.ordereddict
Downloading/unpacking ruamel.ordereddict
  Cannot fetch index base URL https://pypi.python.org/simple/
  ...

So repeat the easy-install trick (it is not necessary to specify pip-2.7 or easy-install-2.7 within the activated virtualenv):

(testvenv) $ easy_install pip==1.2.1
....
(testvenv) $ pip install ruamel.ordereddict
Downloading/unpacking ruamel.ordereddict
   Downloading ruamel.ordereddict-0.4.6.tar.gz (47kB): 47kB downloaded
....
Successfully installed ruamel.ordereddict
Cleaning up...
(testvenv) $
  • Any special version of virtualenv I need use? – user82286 Aug 28 '14 at 13:53
  • I am using the current (latest) version: virtualenv 1.11.6 – Anthon Aug 28 '14 at 13:56
  • Thanx a bunch, pip is installing in my virtualenv now. – user82286 Aug 28 '14 at 14:03
0
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz

tar xvfz pip-1.2.1.tar.gz

cd pip-1.2.1

python setup.py install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.