【发布时间】:2018-10-07 05:58:24
【问题描述】:
我正在尝试使用 PyInstaller 从 Python 脚本创建可执行文件,但出现以下错误:
30391 INFO: Loading module hook "hook-distutils.py"...
Unable to find "\AppData\Local\Programs\Thonny\Include\pyconfig.h" when
adding binary and data files.
我只能找到在 Linux 上遇到此问题的人的实例,但我在 Windows 上。我尝试将一个名为 pyconfig.h 的空文件添加到给定的文件路径中。这允许 PyInstaller 完成,但生成的 .exe 文件只打印一些文本并立即关闭控制台窗口。
我成功地从另一个脚本创建了一个可执行文件,该脚本使用除了 pandas 之外的所有相同包,所以我认为这可能是问题所在。
我正在通过 Thonny 上的系统 shell 运行 PyInstaller。我的操作系统是 Windows 10,我的 Python 版本是 3.6.4。
【问题讨论】:
标签: python python-3.x pandas pyinstaller