'modules appear to be missing' - py2exe

后端 未结 3 2029
一整个雨季
一整个雨季 2021-01-25 16:52

I am using py2exe-0.6.9.win32-py2.7.exe and converted a .py file to .exe. The problem is that it won\'t open as it says something like \'unable to import Frame\' when I try to o

相关标签:
3条回答
  • 2021-01-25 17:28

    What I did is I updated the 'setup.py' file to contain the paths to the missing modules, using

    import sys
    sys.path.insert(0, <path_to_missing_modules>)
    

    This way I do no need to polute the ...\site_packages\ folder.

    0 讨论(0)
  • 2021-01-25 17:46

    you need to place '__init__.py' to every module your using in your project. since init.py tell to your py2exe convertor that there is a python module here.

    Since i have faced the same issue Few days back. with zope.interface and mp_tools i placed empty __init__.py worked fine for me

    0 讨论(0)
  • 2021-01-25 17:47

    Here is what finally worked for me. Manually copying the folder containing the files which your .py(to be converted to .exe) file imports, before running py2exe, to Python27\Lib\site-packages\ fixes such problems I guess.

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