Py2exe missing modules when bundling

左心房为你撑大大i 提交于 2021-02-08 08:30:57

问题


Before I start, I've checked out this question and I already have a windows=[] in my setup.py. Note that I named the script I want to convert Tkinter.py.

Here's my setup.py:

from distutils.core import setup
import py2exe

setup(
    windows=['Tkinter.py'],
    options={
        "py2exe":{
            "bundle_files":1,

        }
    }
)

Here is the error:

C:\Users\Julian\Desktop\Tkinter>python setup.py py2exe
running py2exe

  3 missing Modules
  ------------------
? readline                            imported from cmd, code, pdb
? win32api                            imported from platform
? win32con                            imported from platform
The following modules require a minimum bundle_files option,
otherwise they will not work (currently bundle_files is set to 1):
    tkinter: 2

Please change the bundle_files option and run the build again.
Build failed.

I'm trying to bundle it all down to one exe file. I appreciate the help!


回答1:


Just ignore the missing modules issue. They wont cause any problems. For the Bundling issue, just changing the bundle value to 2 worked for me.



来源:https://stackoverflow.com/questions/44013280/py2exe-missing-modules-when-bundling

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