3

In my script I have imported lxml module. I made an executable file from my script using pyinstaller on Ubuntu. When I run the executable file in terminal I get the following error:

Traceback (most recent call last):
  File "<string>", line 15, in <module>
  File "/home/yaa110/workspace/Python27/src/PyInstaller-2.1/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/yaa110/workspace/Python27/src/PyInstaller-2.1/process/build/process/out00-PYZ.pyz/lxml.html", line 42, in <module>
ImportError: cannot import name etree

How can I fix it?

I'm using Python 2.7.5 on Ubuntu

  • Do you have in your "site" etree installed, right? – Giupo Dec 03 '13 at 19:22
  • @Giupo - Yes, everything is good in Eclipse, but the output (created by pyinstaller) got that error. –  Dec 03 '13 at 19:40
  • I won't post as answer, but maybe this can help : http://pythonhosted.org/PyInstaller/#options-for-finding-imported-modules-and-libraries or this: http://stackoverflow.com/questions/15114695/pyinstaller-import-error?rq=1 – Giupo Dec 03 '13 at 20:22

0 Answers0