I tried every of the 3 approaches.

Unfortunately all 3 came up with this:


*** searching for required modules ***

Traceback (most recent call last):

  File "setup.py", line 35, in <module>

    options = options,

  File "C:\Python26\lib\distutils\core.py", line 152, in setup


  File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands


  File "C:\Python26\lib\distutils\dist.py", line 995, in run_command


  File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 243, in run


  File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 296, in _run

    self.find_needed_modules(mf, required_files, required_modules)

  File "C:\Python26\lib\site-packages\py2exe\build_exe.py", line 1297, in find_n



  File "C:\Python26\lib\site-packages\py2exe\mf.py", line 719, in import_hook

    return Base.import_hook(self,name,caller,fromlist,level)

  File "C:\Python26\lib\site-packages\py2exe\mf.py", line 136, in import_hook

    q, tail = self.find_head_package(parent, name)

  File "C:\Python26\lib\site-packages\py2exe\mf.py", line 204, in find_head_pack


    raise ImportError, "No module named " + qname

ImportError: No module named cElementTree






Von: James McMurray [mailto:jamesmcm03@gmail.com]
Gesendet: Freitag, 2. September 2011 14:35
An: Thomas Eschenburg
Betreff: Re: [Py2exe-users] Error: Element Tree not found


Try adding them to the includes array in the setup.py script. I.e.: within options{ .. }

'includes':['cElementTree', 'elementtree.ElementTree', 'email.Generator', 'email.Iterators', 'ext.IsDOMString', 'ext.SplitQName', 'xml.etree.ElementPath', 'xml.etree.ElementTree', 'xml.etree.cElementTree']


On 2 September 2011 10:36, Thomas Eschenburg <thomas@eschenburg.com> wrote:



I made a python script that is running perfectly without any errors.


Now trying to compile with py2exe which I used many times before without any real trouble.

At the end of compiling it now claims:


The following modules appear to be missing

['cElementTree', 'elementtree.ElementTree', 'email.Generator', 'email.Iterators',

'ext.IsDOMString', 'ext.SplitQName', 'xml.etree.ElementPath', 'xml.etree.ElementTree',


But the Exe has been created.


Executing the resulting exe, the program isn’t running while telling me:


Error: Element Tree not found


Do you have any idea?



Best regards,
Thomas Eschenburg


Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
Py2exe-users mailing list