Re: lxml and py2exe
"Stefan Behnel" <[email protected]> Tue, 13 Jan 2009 11:33:57 +0100 (CET)
| Newsgroups | gmane.comp.python.xml |
|---|---|
| Message-ID | <57904.213.61.181.86.1231842837.squirrel@groupware.dvs.informatik.tu-darmstadt.de> |
Hi,
the best place to ask this would have been comp.lang.python or the
(presumably existing) py2exe mailing list.
Jan Mewes wrote:
> I've a problem with lxml in an .exe file from py2exe. This is the
> error message:
>
> Traceback (most recent call last):
> File "PyQuizzer.py", line 3, in <module>
> File "zipextimporter.pyc", line 82, in load_module
> File "questions.pyc", line 2, in <module>
> File "zipextimporter.pyc", line 98, in load_module
> File "lxml.etree.pyx", line 47, in lxml.etree (src/lxml/lxml.etree.c:
> 124316)
> ImportError: No module named _elementpath
I never used py2exe, but reading the post you referenced, I'd say the
problem is that _elementpath is imported from C code, so py2exe can't see
that it's used. Passing
packages : ['lxml']
to py2exe should solve this. It will stuff more modules into the
executable than required, but it will also make sure nothing that *is*
required will get lost.
Stefan
_______________________________________________
XML-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/xml-sig