Nov-25-2019, 10:25 AM
Hi
On Windows 10, I have an application that works when frozen with PyInstaller and Python 3.7.4 (32-bit). After upgrading to Python 3.8.0 (64-bit) with all corresponding modules and PyInstaller the frozen code now exhibits a DLL load failure saying the specified module could not be found?
3.7.4 (32-bit) build:
On Windows 10, I have an application that works when frozen with PyInstaller and Python 3.7.4 (32-bit). After upgrading to Python 3.8.0 (64-bit) with all corresponding modules and PyInstaller the frozen code now exhibits a DLL load failure saying the specified module could not be found?
Error:C:\Playpen\kiwi\py38>kiwiCalling.exe
Traceback (most recent call last):
File "kiwiCalling.py", line 7, in <module>
import gui1, gui2, finder
File "c:\users\bayki\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "gui2.py", line 10, in <module>
from scipy import signal
File "c:\users\bayki\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\signal\__init__.py", line 289, in <module>
File "c:\users\bayki\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\signal\windows\__init__.py", line 41, in <module>
File "c:\users\bayki\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\signal\windows\windows.py", line 9, in <module>
File "c:\users\bayki\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\fftpack\__init__.py", line 99, in <module>
File "c:\users\bayki\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\scipy\fftpack\basic.py", line 12, in <module>
ImportError: DLL load failed while importing _fftpack: The specified module could not be found.
[312] Failed to execute script kiwiCalling
I have examined the warnings file and there is no warning for missing _fftpack. Also, I have looked at and compared the xref files for both the 3.7.4 and 3.8.0 builds and the output looks equivalent.3.7.4 (32-bit) build:
Output:...
scipy.fftpack._fftpack c:\users\bayki\appdata\local\programs\python\python37-32\lib\site-packages\scipy\fftpack\_fftpack.cp37-win32.pyd
imports: scipy.fftpack
imported by: scipy.fftpack • scipy.fftpack.basic • scipy.fftpack.realtransforms
...
scipy.fftpack.basic SourceModule
imports: __future__ • atexit • numpy • scipy.fftpack • scipy.fftpack._fftpack • scipy.fftpack.helper
imported by: scipy.fftpack • scipy.fftpack.pseudo_diffs • scipy.fftpack.realtransforms
...
3.8.0 (64-bit) build:Output:...
scipy.fftpack._fftpack c:\users\bayki\appdata\local\programs\python\python38\lib\site-packages\scipy\fftpack\_fftpack.cp38-win_amd64.pyd
imports: scipy.fftpack
imported by: scipy.fftpack • scipy.fftpack.basic • scipy.fftpack.realtransforms
...
scipy.fftpack.basic SourceModule
imports: __future__ • atexit • numpy • scipy.fftpack • scipy.fftpack._fftpack • scipy.fftpack.helper
imported by: scipy.fftpack • scipy.fftpack.pseudo_diffs • scipy.fftpack.realtransforms
...
The xref output indicates to me that PyInstaller found the DLL during the build process but somehow does not now associate it with the relative import code (line 12 in basic.py):from . import _fftpack