https://bitbucket.org/OES_muni/massiveoes using pyinstaller after upgrade from python 2.7 to 3.6 and同時にscipy 1.0.0に移動します。私は64ビットwin7マシンで作業しています。プログラム自体は正常に実行され、pyinstallerはエラーなしで実行されますが、ビルドexeファイルを実行しようとすると、次のエラーが発生します。
Traceback (most recent call last): File "massiveOES\GUI.py", line 23, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__) File "massiveOES\__init__.py", line 1, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__) File "massiveOES\FHRSpectra.py", line 1, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__) File "massiveOES\spectrum.py", line 3, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__) File "site-packages\scipy\optimize\__init__.py", line 241, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__) File "site-packages\scipy\optimize\_minimize.py", line 28, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__) File "site-packages\scipy\optimize\_trustregion_krylov.py", line 2, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__) File "site-packages\scipy\optimize\_trlib\__init__.py", line 1, in <module> File "c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
module = loader.load_module(fullname) File "messagestream.pxd", line 5, in init scipy.optimize._trlib._trlib ModuleNotFoundError: No module named 'scipy._lib.messagestream' [2128] Failed to execute script GUI
OK、次は私のために当面の問題を解決しました:pyinstallerを編集します.spec
ファイルを使用して、次の隠しインポートをScipy
で追加します。
hiddenimports=['scipy._lib.messagestream']
詳細は 私の質問 を参照してください。