Why am I getting this ImportError?

被刻印的时光 ゝ 提交于 2019-12-01 07:10:51
Alex Thornton

Looks like py2exe doesn't realize it should include the lxml._elementpath module, which is conditionally imported by lxml.etree. You can tell it to include that module explicitly with the includes keyword argument in your setup.py.

setup(
    options={'py2exe': {"includes": ["lxml._elementpath"]}}
)

Py2exe has made documentation of this error on this page: http://www.py2exe.org/index.cgi/WorkingWithVariousPackagesAndModules

They also offer a working solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!