Reputation: 1670
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.
Upvotes: 2
Views: 216
Reputation: 88
pip versions 1.4.1+ no longer support Python 2.5. I recommend you install an older version of pip (1.3.1 will do) or use a more recent version of Python2 (2.6 will do).
Source: http://www.pip-installer.org/en/latest/installing.html
Upvotes: 1
Reputation: 1121834
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.
Upvotes: 4