问题
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