py2exe and distutils

Maxim Demenko mdemenko at
Sat Feb 7 15:27:24 CET 2009

i have installed Python 2.5.4 on WinXP, setuptools-0.6c9 and py2exe 0.6.9
Now i can't list installed modules, here is the stacktrace:

help> modules

Please wait a moment while I gather a list of all available modules...

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Programme\Python25\lib\", line 346, in __call__
     return*args, **kwds)
   File "C:\Programme\Python25\lib\", line 1649, in __call__
   File "C:\Programme\Python25\lib\", line 1667, in interact
   File "C:\Programme\Python25\lib\", line 1683, in help
     elif request == 'modules': self.listmodules()
   File "C:\Programme\Python25\lib\", line 1804, in listmodules
   File "C:\Programme\Python25\lib\", line 1855, in run
     for importer, modname, ispkg in pkgutil.walk_packages():
   File "C:\Programme\Python25\lib\", line 110, in walk_packages
"C:\Programme\Python25\Lib\site-packages\setuptools\", line 
2, in <module>
     from setuptools.extension import Extension, Library
"C:\Programme\Python25\Lib\site-packages\setuptools\", line 
2, in <module>
     from dist import _get_unpatched
   File "C:\Programme\Python25\Lib\site-packages\setuptools\", 
line 27, in <module>
     _Distribution = _get_unpatched(_Distribution)
   File "C:\Programme\Python25\Lib\site-packages\setuptools\", 
line 23, in _get_unpatched
     "distutils has already been patched by %r" % cls
AssertionError: distutils has already been patched by <class 
py2exe.Distribution at 0x011B4F90>

Any suggestion, how to fix this issue?

Best regards


More information about the Python-list mailing list