scipy - 导入 scipy 或 scipy.signal 时 Pyinstaller --onefile 警告 pyconfig.h

标签 scipy pyinstaller

这很容易重新创建。
如果我的脚本 foo.py 是:

import scipy

然后运行:
python pyinstaller.py --onefile foo.py

当我启动 foo.exe 时,我得到:
WARNING: file already exists but should not: C:\Users\username\AppData\Local\Temp\_MEI86402\Include\pyconfig.h

我已经测试了几个版本,但我确认的最新版本是在 Win7、Python 2.7.5(32 位)、Scipy 版本 0.12.0 上运行的 2.1dev-e958e02

我已经向 Pyinstaller 人员提交了一张票,但还没有听到任何消息。任何线索如何进一步调试?

最佳答案

您可以通过在 a=Analysis 之后添加这些行来破解规范文件以删除第二个实例:

for d in a.datas:
    if 'pyconfig' in d[0]: 
        a.datas.remove(d)
        break

关于scipy - 导入 scipy 或 scipy.signal 时 Pyinstaller --onefile 警告 pyconfig.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19055089/

相关文章:

python - 如何将基于 tkinter 的应用程序与自定义图标捆绑在一起?

python - Scipy:对数正态拟合

python:二维矩阵中更快的局部最大值

python - 如何在 python 中使用 scipy.optimize 中的 leastsq 函数将直线和二次线拟合到数据集 x 和 y

python - 如何使用 celery 任务创建单个文件可执行文件

python - 导出单个 .exe 时,PyInstaller 卡在 "Building PKG ..."上

python - 在数值函数中包含逻辑

python - 任何加速从磁盘读取数据并将其转换为 numpy 数组以供进一步处理的解决方案?

python - Pyinstaller 不拾取树或数据文件

python - pyinstaller 将我的 Python 字节码放置在哪里?