Py2Exe错误:缺少run-py3.5-win-amd64.exe文件。

7
运行 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'

我猜测这是因为Py2Exe目前只支持Python 3.4,但我想知道是否有一种方法可以强制执行它(而不需要安装另一个Python版本)。


请参见:https://dev59.com/FlwY5IYBdhLWcg3wJU54 - Damian
1个回答

1
如果这些模块对您的应用程序没有任何用处,那么只需在设置文件中添加排除命令。它将自动排除这些模块并停止发送警告。
    setup(
    options={'py2exe':{'excludes':['Image','PIL._imagingagg','PyQt4',
    'PyQt5','_abcoll','_imaging_gif','_util','cffi','lxml','openpyxl.tests',
    'readline','tkinter']}},
     )

很不幸,我的应用程序中有一些被使用了。 - user987654321

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接