【问题标题】:Py2Exe Error: Missing run-py3.5-win-amd64.exePy2Exe 错误:缺少 run-py3.5-win-amd64.exe
【发布时间】:2016-06-25 16:08:32
【问题描述】:

运行 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 版本)。

【问题讨论】:

标签: python python-3.x py2exe


【解决方案1】:

如果这些模块对您的应用程序没有任何用处,那么只需在您的安装文件中添加排除命令。它会自动排除这些模块并停止发送警告。

    setup(
    options={'py2exe':{'excludes':['Image','PIL._imagingagg','PyQt4',
    'PyQt5','_abcoll','_imaging_gif','_util','cffi','lxml','openpyxl.tests',
    'readline','tkinter']}},
     )

【讨论】:

  • 不幸的是,我的应用程序中使用了其中一些。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-06-06
  • 2015-01-08
  • 1970-01-01
  • 1970-01-01
  • 2020-07-07
  • 1970-01-01
相关资源
最近更新 更多