py2exe and distutils

Discussion in 'Python' started by Maxim Demenko, Feb 7, 2009.

  1. Hi,
    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\site.py", line 346, in __call__
    return pydoc.help(*args, **kwds)
    File "C:\Programme\Python25\lib\pydoc.py", line 1649, in __call__
    self.interact()
    File "C:\Programme\Python25\lib\pydoc.py", line 1667, in interact
    self.help(request)
    File "C:\Programme\Python25\lib\pydoc.py", line 1683, in help
    elif request == 'modules': self.listmodules()
    File "C:\Programme\Python25\lib\pydoc.py", line 1804, in listmodules
    ModuleScanner().run(callback)
    File "C:\Programme\Python25\lib\pydoc.py", line 1855, in run
    for importer, modname, ispkg in pkgutil.walk_packages():
    File "C:\Programme\Python25\lib\pkgutil.py", line 110, in walk_packages
    __import__(name)
    File
    "C:\Programme\Python25\Lib\site-packages\setuptools\__init__.py", line
    2, in <module>
    from setuptools.extension import Extension, Library
    File
    "C:\Programme\Python25\Lib\site-packages\setuptools\extension.py", line
    2, in <module>
    from dist import _get_unpatched
    File "C:\Programme\Python25\Lib\site-packages\setuptools\dist.py",
    line 27, in <module>
    _Distribution = _get_unpatched(_Distribution)
    File "C:\Programme\Python25\Lib\site-packages\setuptools\dist.py",
    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

    Maxim
     
    Maxim Demenko, Feb 7, 2009
    #1
    1. Advertising

  2. Maxim Demenko schrieb:
    > Hi,
    > 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\site.py", line 346, in __call__
    > return pydoc.help(*args, **kwds)
    > File "C:\Programme\Python25\lib\pydoc.py", line 1649, in __call__
    > self.interact()
    > File "C:\Programme\Python25\lib\pydoc.py", line 1667, in interact
    > self.help(request)
    > File "C:\Programme\Python25\lib\pydoc.py", line 1683, in help
    > elif request == 'modules': self.listmodules()
    > File "C:\Programme\Python25\lib\pydoc.py", line 1804, in listmodules
    > ModuleScanner().run(callback)
    > File "C:\Programme\Python25\lib\pydoc.py", line 1855, in run
    > for importer, modname, ispkg in pkgutil.walk_packages():
    > File "C:\Programme\Python25\lib\pkgutil.py", line 110, in walk_packages
    > __import__(name)
    > File
    > "C:\Programme\Python25\Lib\site-packages\setuptools\__init__.py", line
    > 2, in <module>
    > from setuptools.extension import Extension, Library
    > File
    > "C:\Programme\Python25\Lib\site-packages\setuptools\extension.py", line
    > 2, in <module>
    > from dist import _get_unpatched
    > File "C:\Programme\Python25\Lib\site-packages\setuptools\dist.py",
    > line 27, in <module>
    > _Distribution = _get_unpatched(_Distribution)
    > File "C:\Programme\Python25\Lib\site-packages\setuptools\dist.py",
    > 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?


    Looks like a setuptools problem to me. Here's the output on my system:

    >>> 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:\python25\lib\site.py", line 346, in __call__
    return pydoc.help(*args, **kwds)
    File "c:\python25\lib\pydoc.py", line 1645, in __call__
    self.help(request)
    File "c:\python25\lib\pydoc.py", line 1682, in help
    elif request == 'modules': self.listmodules()
    File "c:\python25\lib\pydoc.py", line 1803, in listmodules
    ModuleScanner().run(callback)
    File "c:\python25\lib\pydoc.py", line 1854, in run
    for importer, modname, ispkg in pkgutil.walk_packages():
    File "c:\python25\lib\pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
    File "c:\python25\lib\pkgutil.py", line 110, in walk_packages
    __import__(name)
    File "c:\python25\lib\site-packages\pyopengl-3.0.0b1-py2.5.egg\OpenGL\Tk\__init__.py", line 87, in <module>
    _default_root.tk.call('package', 'require', 'Togl')
    _tkinter.TclError: can't find package Togl
    >>> ^Z


    Thomas
     
    Thomas Heller, Feb 7, 2009
    #2
    1. Advertising

  3. > Maxim Demenko schrieb:
    >> Hi,
    >> 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:

    [...]
    >> Any suggestion, how to fix this issue?

    >

    Thomas Heller schrieb:
    > Looks like a setuptools problem to me. Here's the output on my system:


    Actually, I don't know where the problem is. Maybe pydoc?

    >
    > Thomas
     
    Thomas Heller, Feb 7, 2009
    #3
  4. Thomas Heller schrieb:
    >> Maxim Demenko schrieb:
    >>> Hi,
    >>> 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:

    > [...]
    >>> Any suggestion, how to fix this issue?

    > Thomas Heller schrieb:
    >> Looks like a setuptools problem to me. Here's the output on my system:

    >
    > Actually, I don't know where the problem is. Maybe pydoc?
    >
    >> Thomas


    Thank you Thomas,
    i found http://thread.gmane.org/gmane.comp.python.distutils.devel/3340
    and tried to import setuptools first - indeed, in this case the problem
    seems to be solved, however, would like to know, how to persist it.
    If i put it into py2exe.__init__.py - is it a very bad idea?

    Best regards

    Maxim
     
    Maxim Demenko, Feb 7, 2009
    #4
  5. En Sat, 07 Feb 2009 18:39:19 -0200, Thomas Heller <>
    escribió:

    >> Maxim Demenko schrieb:
    >>> Hi,
    >>> 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:

    > [...]
    >>> Any suggestion, how to fix this issue?

    >>

    > Thomas Heller schrieb:
    >> Looks like a setuptools problem to me. Here's the output on my system:

    >
    > Actually, I don't know where the problem is. Maybe pydoc?


    Yes, pydoc isn't robust enough in 2.5; see
    <http://groups.google.com/group/comp.lang.python/browse_thread/thread/4d07c1f7bdb49b94/1bdd47421061c788#1bdd47421061c788>
    for a quick fix.

    --
    Gabriel Genellina
     
    Gabriel Genellina, Feb 8, 2009
    #5
  6. Gabriel Genellina schrieb:
    > En Sat, 07 Feb 2009 18:39:19 -0200, Thomas Heller <>
    > escribió:
    >
    >>> Maxim Demenko schrieb:
    >>>> Hi,
    >>>> 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:

    >> [...]
    >>>> Any suggestion, how to fix this issue?
    >>>

    >> Thomas Heller schrieb:
    >>> Looks like a setuptools problem to me. Here's the output on my system:

    >>
    >> Actually, I don't know where the problem is. Maybe pydoc?

    >
    > Yes, pydoc isn't robust enough in 2.5; see
    > <http://groups.google.com/group/comp.lang.python/browse_thread/thread/4d07c1f7bdb49b94/1bdd47421061c788#1bdd47421061c788>
    > for a quick fix.
    >


    Thank you Gabriel, that works nicely.

    Best regards

    Maxim
     
    Maxim Demenko, Feb 9, 2009
    #6
  7. Gabriel Genellina schrieb:
    > En Sat, 07 Feb 2009 18:39:19 -0200, Thomas Heller <>
    > escribió:
    >
    >>> Maxim Demenko schrieb:
    >>>> Hi,
    >>>> 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:

    >> [...]
    >>>> Any suggestion, how to fix this issue?
    >>>

    >> Thomas Heller schrieb:
    >>> Looks like a setuptools problem to me. Here's the output on my system:

    >>
    >> Actually, I don't know where the problem is. Maybe pydoc?

    >
    > Yes, pydoc isn't robust enough in 2.5; see
    > <http://groups.google.com/group/comp.lang.python/browse_thread/thread/4d07c1f7bdb49b94/1bdd47421061c788#1bdd47421061c788>
    > for a quick fix.
    >


    Thank you Gabriel, that works nicely.

    Best regards

    Maxim
     
    Maxim Demenko, Feb 9, 2009
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ray sleeper
    Replies:
    0
    Views:
    375
    ray sleeper
    Oct 31, 2003
  2. Ray
    Replies:
    1
    Views:
    314
    Thomas Heller
    Nov 1, 2003
  3. Skip Montanaro
    Replies:
    0
    Views:
    382
    Skip Montanaro
    Oct 31, 2003
  4. timw.google
    Replies:
    1
    Views:
    563
    Serge Orlov
    May 11, 2006
  5. Luis Alberto Zarrabeitia Gomez

    distutils, No module named numpy.distutils.fcompiler.conv_template

    Luis Alberto Zarrabeitia Gomez, Mar 30, 2009, in forum: Python
    Replies:
    0
    Views:
    1,363
    Luis Alberto Zarrabeitia Gomez
    Mar 30, 2009
Loading...

Share This Page