【发布时间】:2018-02-08 00:16:43
【问题描述】:
使用 scipy 模块的小 Python 脚本可以完美执行,但是当使用 pyinstaller 编译独立可执行文件时,可执行文件会失败。细节: Windows 10 python 2.7.10 pyinstaller 3.3.1 错误信息是:
C:\Users\barry\Desktop\Testing>TestScipy
Traceback (most recent call last):
File "TestScipy.py", line 15, in <module>
from scipy import stats
File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\stats\__init__.py", line 343, in <module>
File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\stats\stats.py", line 169, in <module>
File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\special\__init__.py", line 640, in <module>
File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 687, in load_module
module = imp.load_module(fullname, fp, filename, ext_tuple)
ImportError: DLL load failed: The specified module could not be found.
[9476] Failed to execute script TestScipy
如何确保 pyinstaller 正确加载 scipy?
【问题讨论】:
标签: python-2.7 scipy pyinstaller