Python3.2.2 install easy_install error

I want to learn python, so I get python3.2.2 and install it on ubuntu10. As we know, Ubuntu was preinstalled with python2.6. So delete the old link and create a new link to python3.2.2, everything is fine.

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 an 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 

message shown: I'm using python2.6 !!! What I like, I like python3.2.2, so I checked the current version of pyton.

 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 changes to the installation of ez_setup.py?

thanks.

+4
source share
2 answers

This seems to be a problem with the easy_install version. Serverfault has a similar thread. Check this:

https://serverfault.com/questions/73741/easy-installing-under-different-python-version

This is a similar case, but must be installed for an older version.

0
source

ez_setup.py does not work with python3.x
Go back to python2.x and it should start working. (My experience with 64-bit installation)

0
source

Source: https://habr.com/ru/post/1400697/


All Articles