Py2Exe “The following modules are missing”

99封情书 提交于 2019-12-02 01:25:15

First, check if your packages are in .EGG format

It appears Py2Exe has problems with Python's .egg packages. By extracting the .egg files (rename to .zip and extract into site-packages excluding EGG-INFO folder), Py2Exe can now detect those packages without issues.

Check your setup.py to make sure you're using the right option. Windowed applications use "windows=" where-as console applications use "console="

In some other cases it could be through the use of setup(console=['main.py']) instead of setup(windows=['main.py']) if you're producing a windowed application.

If it's still not working, you can try telling Py2Exe to manually include the package

Some packages can further be resolved by adding them to the package options of your setup.py like this:

setup(
    windows=['main.py'],
    options={
            "py2exe":{
                    "packages": ["Crypto", "Padding"]
            }
    }
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!