ImportError with cx_Freeze and pyinstaller

前端 未结 4 1323
轮回少年
轮回少年 2021-01-03 02:24

I was using pyinstaller before to try and get my app with twisted as an executable, but I got this error when executing:

Traceback (most recent call last):
          


        
相关标签:
4条回答
  • 2021-01-03 03:05

    I had the same issue with cx_freeze. None of the above solutions seemed to work in my case. For me this solution from here worked :

    You need to actually create zope/__init__.py as an empty file so that the normal processing performed by imp.find_module() actually works

    0 讨论(0)
  • 2021-01-03 03:27

    Add pkg_resources to your includes in your setup.py for cx_Freeze.

    0 讨论(0)
  • 2021-01-03 03:28

    Try adding to build_exe_options a specific include of the subpackage i.e. "includes": ["zope.interface"], this should force the inclusion of it.

    0 讨论(0)
  • 2021-01-03 03:29

    When I add 'pkg_resources' in includes and run the cx_freeze script, I only get these first two lines and it stays here :

    running build

    running build_exe

    0 讨论(0)
提交回复
热议问题