python3.2.2 install easy_install error
-
10-12-2019 - |
Question
I want to learn python, so I get python3.2.2 and install it on ubuntu10 . As we know ubuntu have been preinstalled python2.6. So delete the old link, and create a new link to python3.2.2, everything is ok.
Now, I want to install easy_install, and I followed the steps on the website .
sudo wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
and error occurs:
xx@ubuntu:/usr/local/lib/python2.6/dist-packages$ python ez_setup.py
File "ez_setup.py", line 106
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
the message show: I am using python2.6 !!! what's up, I have been liked to python3.2.2, so I checked the current pyton version.
xx@ubuntu:/usr/local/lib/python2.6/dist-packages$ python
Python 3.2.2 (default, Mar 9 2012, 07:38:22)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
it shows that I am now using python 3.2.2. So, how can I make a change to install ez_setup.py?
thanks.
Solution
Seems to be a version issue of easy_install. There is a similar thread in Serverfault. Check this one:
https://serverfault.com/questions/73741/easy-installing-under-different-python-version
It's a similar case, but the need is to install for older version.
OTHER TIPS
ez_setup.py does not work with python3.x
Revert back to python2.x and it should start working. (My experience from 64bit installation)