I then did
virtualenv -p python2.5 --no-site-packages TEST_ENV_2.5
Then started figuring out what other dependencies I needed in the
virtualenv to get the system running.
So I did:
source activate
pip install readline
pip install ipython
pip install PIL
so far so good, no issues.
I then needed the package ssl and that's when it started going wrong:
....
copying test/test_ssl.py -> /usr/local/python2.5/lib/python2.5/test
error: /usr/local/python2.5/lib/python2.5/test/test_ssl.py: Permission denied
----------------------------------------
Command /home/jammyz/playground/TEST_ENV_2.5/bin/python2.5 -c "import
setuptools; __file__='/home/jammyz/playground/TEST_ENV_2.5/build/ssl/setup.py';
execfile('/home/jammyz/playground/TEST_ENV_2.5/build/ssl/setup.py')"
install --single-version-externally-managed --record
/tmp/pip-0Igjsq-record/install-record.txt --install-headers
/home/jammyz/playground/TEST_ENV_2.5/include/site/python2.5 failed
with error code 1
Storing complete log in /home/jammyz/.pip/pip.log
Traceback (most recent call last):
File "/home/jammyz/playground/TEST_ENV_2.5/bin/pip", line 9, in <module>
load_entry_point('pip==0.7.2', 'console_scripts', 'pip')()
File "/home/jammyz/playground/TEST_ENV_2.5/lib/python2.5/site-packages/pip-0.7.2-py2.5.egg/pip/__init__.py",
line 94, in main
return command.main(initial_args, args[1:], options)
File "/home/jammyz/playground/TEST_ENV_2.5/lib/python2.5/site-packages/pip-0.7.2-py2.5.egg/pip/basecommand.py",
line 139, in main
log_fp = open_logfile(log_fn, 'w')
File "/home/jammyz/playground/TEST_ENV_2.5/lib/python2.5/site-packages/pip-0.7.2-py2.5.egg/pip/basecommand.py",
line 196, in open_logfile
log_fp = open(filename, mode)
IOError: [Errno 13] Permission denied: '/home/jammyz/.pip/pip.log'
It still seems to be working fine, ssl seems to be available, but it
is not nice to see that error. Looks like it needs to copy a file into
the python2.5 installation folder and it doesn't have permissions.
I want to write a set of instructions on how to get the virtualenv
setup for other developers (working on Mac OS), is there any way I can
get around the permissions issue?
Thanks.
Iker.
The actual problem, as you said is that the setup.py for the package is
a little dodgy, and always trys to copy some test files under /usr.
You pretty much have to fix that by hand,
download the source for the ssl module from
http://pypi.python.org/pypi/ssl/1.15#downloads
edit the setup.py and comment out these lines (its just stuff for
running test on the package, so you dont really need it)
#data_files=[(testdir, ['test/test_ssl.py',
# 'test/keycert.pem',
# 'test/badcert.pem',
# 'test/badkey.pem',
# 'test/nullcert.pem'])],
Then run python setup.py install (after source bin/activate of course)
and you should be ok.
Sean
Could also try changing this line in setup.py for ssl.
from
get_python_lib(False, True)
to
get_python_lib()
Michael