5

I am trying to install easy_install by running ez_setup.py from command line (64bit windows machine) and getting a "Invalid Syntax" on the following line:

except pkg_resources.VersionConflict, e:

Python version 3.2.3

Any suggestions how to resolve this? Thanks

UPDATE: Sorry people, I am completely new to Python, now it is failing on this line:

print "Setuptools version",version,"or greater has been installed."

d1337
  • 2,543
  • 6
  • 24
  • 22
  • Print is now a function, so it needs parentheses. Like `print ("Setuptools version",version,"or greater has been installed.")` – Nathan Andrew Mullenax Aug 19 '12 at 19:35
  • Use [distribute](http://pypi.python.org/pypi/distribute/). – Matthias Aug 19 '12 at 19:39
  • I also had to change 'import urllib2, shutil' to 'import urllib, shutil'. But now it fails on 'File "D:\Python32\lib\distutils\log.py", line 30, in _log if stream.errors == 'strict': AttributeError: errors' Is there a version of this script for Python 3? Or should I just install an older version of python? – d1337 Aug 19 '12 at 19:39
  • 1
    As I said: use distribute. Look at [this question](http://stackoverflow.com/questions/3849762/python-3-easy-install-pip-and-pypi). – Matthias Aug 19 '12 at 19:41
  • Distribute installation worked fine, now I just need to understand how to use it :/ Thanks! (Submit as answer so I could tag it?) – d1337 Aug 19 '12 at 20:01
  • I will try an older version of python. Looks like python for windows is not really mature yet. Every time I try it it points me to broken python scripts and not working installs. – HMR Mar 11 '13 at 07:21

2 Answers2

7

Change the comma to 'as'

except pkg_resources.VersionConflict as e:
samoz
  • 56,849
  • 55
  • 141
  • 195
0

I tried to get python 3.3 working on my x64 Windows 8 machine, and went through a couple of circles before finding the following method to load everything:

  • Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/

  • Install distribute from binary - ignore the deprecation warning at the front of the installer. Those unofficial binaries don't even have a "setuptools" download, and the projects don't seem to have been updated in years.

  • Install pip from binary. It didn't work for me in the first couple of attempts, something about pkg_resources, so I think distribute may have helped.

Now I have pip running and I can use it to install things.

Lamarth
  • 506
  • 4
  • 12