[TIP] python2.5 and ssl in virtualenvs: chicken and egg

Chris Withers chris at simplistix.co.uk
Fri Mar 15 15:30:37 PDT 2013


Hi All,

Can anyone help with this:

http://jenkins.simplistix.co.uk/job/checker-tox/60/PYTHON=2.5,label=linux/console

The base python has ssl installed:

Python 2.5.5 (r255:77872, Nov 28 2010, 19:00:19)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import ssl

...but when I create a virtualenv, it goes away:

chris at server2:~/virtualenv$ python2.5 virtualenv.py test_env
New python executable in test_env/bin/python2.5
Also creating executable in test_env/bin/python
Installing setuptools............................done.
Installing pip.....................done.
chris at server2:~/virtualenv$ ./test_env/bin/python2.5
Python 2.5.5 (r255:77872, Nov 28 2010, 19:00:19)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import ssl
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named ssl

Of course, I can't re-install it, because I need it to install it :-(

chris at server2:~/virtualenv$ ./test_env/bin/pip install ssl
Downloading/unpacking ssl
Exception:
Traceback (most recent call last):
<snip>
NoSSLError:
<snip>

What am I supposed to do here?

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk



More information about the testing-in-python mailing list