4

For some reason, every time I attempt to install a new module using easy_install, I'm getting the error:

AttributeError: 'module' object has no attribute '__getstate__'

I'm using setuptools-0.6c11-py2.6

BryanWheelock
  • 12,146
  • 18
  • 64
  • 109

4 Answers4

6

Try http://code.activestate.com/lists/python-distutils-sig/13989/: the gist is "reinstall setuptools".

Katriel
  • 120,462
  • 19
  • 136
  • 170
3

I had the same problem, but the solution was that i had two versions of setuptools: one was in /usr/local/lib/python2.6/dist-packages/distribute-0.6.8-py2.6.egg/ and one was in /usr/lib/python2.6/dist-packages/. the former was an outdated version, but /usr/local/lib/python2.6/dist-packages is earlier on my path. i removed the old one, and was good to go.

jessykate
  • 255
  • 1
  • 12
  • In my case I found several of files that seem related to `setuptools` (incl. files that have `easy_install` in their names). I removed all as far as I've found and reinstalling `setuptools` worked. Thx – IsaacS Jul 15 '12 at 06:37
0

try yum reinstall python-setuptools and run the easy_install command again.

sloth
  • 99,095
  • 21
  • 171
  • 219
Nam Le
  • 1,126
  • 7
  • 7
0

For me the problem was the same as jessykate mentioned, but the exact opposite.

I had to REMOVE the version installed to /usr/local/lib/python2.6/dist-packages/ and KEEP the version located in /usr/lib/python2.6/dist-packages/ This was on Ubuntu 10.04 LTS. Hope that helps.