4

I'm trying to easy_install a Python 2.5 package, but I've also got Python 3.1 installed, so I get a syntax error:

except pkg_resources.VersionConflict, e:                                    
                                    ^                                       
SyntaxError: invalid syntax

How do I tell easy_install I want it to install (ReviewBoard, in this case) with Python 2.5?

2 Answers2

6

The easy_install code installs the packages for whichever version of Python is being used to run it. It sounds like your system default version of Python is 3.1, so something like this should make it work the way you want:

/path/to/python2.5 /path/to/easy_install ReviewBoard

Worst case you can edit the easy_install script and change the shebang to point to your 2.5 binary.

Insyte
  • 9,554
0

Python 2.6 recently became stable on Gentoo, and it looks like it's installed as you're having an easy_install-2.6 script - so it might be that some things got mixed up. That's what I'd do:

In case you're willing to update to python-2.6 (at some point you'll have to):

  • install python 2.6
  • use eselect python to select the right version
  • run python-updater something alike: python-updater -o 2.5 -- -av

In case you want to stay with 2.5:

Try to clean up your installation:

  • Use eselect python to make sure 2.5 is selected
  • Re-merge dev-python/setuptools
  • Eventually run revdep-rebuild -- -a to clean things up
nidi
  • 200