I've created a virtualenv that uses python2.5 instead of my default version python2.6 by executing this command:
virtualenv -p /usr/bin/python2.5 myvirtualenv --no-site-packages
Now, when I want to install packages in the virtualenv using pip, I get syntax errors like this one:
File "/home/philipp/.virtualenvs/myvirtualenv/lib/python2.5/site-packages/pip-1.4.1-py2.5.egg/pip/vendor/distlib/compat.py", line 276
return b''
^
SyntaxError: invalid syntax
That means that my python2.5 packages contain syntax that is not yet valid in python2.5. When I use pip-2.5
this will not change anything. There should be two possibilities to get around this problem:
I'm happy about any ideas about how to proceed.
Pip version 1.4 requires Python 2.6 or newer.
You'll need to install Pip version 1.3.1 if you want it to work on Python 2.5, see Python & OS Support.