use*_*321 7 python py2exe python-3.x
运行Py2Exe时接收以下内容:
running py2exe
12 missing Modules
------------------
? Image imported from openpyxl.drawing.image
? PIL._imagingagg imported from PIL.ImageDraw
? PyQt5 imported from PIL.ImageQt
? PySide imported from PIL.ImageQt
? _abcoll imported from openpyxl.compat.odict
? _imaging_gif imported from PIL.GifImagePlugin
? _util imported from PIL.ImageCms
? cffi imported from PIL.Image, PIL.PyAccess
? lxml imported from openpyxl.xml, openpyxl.xml.functions
? openpyxl.tests imported from openpyxl.reader.excel
? readline imported from cmd, code, pdb
? tkinter imported from PIL.ImageTk
Building 'dist\dlpreport.exe'.
error: [Errno 2] No such file or directory: 'C:\\Python\\lib\\site-packages\\py2exe\\run-py3.5-win-amd64.exe'
Run Code Online (Sandbox Code Playgroud)
我假设这是因为Py2Exe目前是为Python 3.4构建的,但我想知道是否有办法强制通过(不安装另一个Python构建).
小智 1
如果这些模块对您的应用程序没有任何用处,则只需在安装文件中添加排除命令即可。它将自动排除这些模块并停止发送警告。
setup(
options={'py2exe':{'excludes':['Image','PIL._imagingagg','PyQt4',
'PyQt5','_abcoll','_imaging_gif','_util','cffi','lxml','openpyxl.tests',
'readline','tkinter']}},
)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2695 次 |
最近记录: |