[PyKDE] elementtree.ElementTree in latest PyQt4 missing?

Phil Thompson phil at riverbankcomputing.co.uk
Thu Nov 16 13:22:18 GMT 2006


> hi,
>
> I am using PyQt4 at workplace on a windows platform. I just got new
> computer
> to work on, and had to install all my software again.. latest PyQt4 seems
> to
> require Python 2.5 so I installed that... along with Qt 4.2.1.  everything
> seems to be running nicely, except one thing:
>
> when I launch my program from commandline, it works ok. but when I pack it
> with py2exe, and try to run the .exe I get error about elementtree, and
> how
> it's missing. this is the error message:
> Traceback (most recent call last):
>  File "var.py", line 4, in <module>
>  File "PyQt4\uic\__init__.pyc", line 7, in <module>
>  File "PyQt4\uic\Compiler\compiler.pyc", line 9, in <module>
>  File "PyQt4\uic\uiparser.pyc", line 15, in <module>
> ImportError: No module named elementtree.ElementTree
>
> anyone have any ideas what this is about..?
>
> I noticed that when running py2exe I also get info on missing library
> while
> it's compiling. it says PyQt4.elementtree.ElementTree is missing.
>
> on my old machine with python2.4 and little bit older PyQt4 this worked
> just
> fine.. so something has changed, and i have no idea what.
> any information highly appreciated so I can get this thing rolling..

The import of that module is only attempted if the standard (as of Python
2.5) elementtree cannot be found. configure.py does not install it for
Python 2.5 as it isn't needed.

It looks like py2exe is being too aggressive in working out the module
dependencies.

Phil




More information about the PyQt mailing list