1

I'm hoping someone can help me debug the following error message from pyinstall.

I'm trying to compile a script to exe and have been dealing with hidden modules for days, however I've come across a new error message which seems to be a missing .dll file.

Problem is, I can't tell which one is causing the problem. Hoping someone experienced in compiling can assist me in debugging this error message. Looking at the traceback, 'scipy.interpolate' and 'scipy.linalg' seem important. However, I have included them in the .spec file for pyinstall and it does not change the output.

The script uses GDAL and I have therefore included gdal111.dll, geos_c.dll in the build folder.

I have also run the script through dependency walker however I don't really know what I am doing or what to look for. Here is a screenshot of the DLLs. Maybe it's not obvious to me, but they don't look like python ones.

Dep Walker Screenshot

# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
import marshal # builtin
import _struct # builtin
import nt # builtin
import imp # builtin
import zlib # builtin
import errno # builtin
import _weakref # builtin
import _codecs # builtin
import _sre # builtin
import _locale # builtin
import _ctypes # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\_ctypes.pyd
import PIL._imaging # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\PIL._imaging.pyd
import _collections # builtin
import operator # builtin
import itertools # builtin
import _heapq # builtin
import thread # builtin
import _io # builtin
import array # builtin
import math # builtin
import strop # builtin
import _functools # builtin
import binascii # builtin
import _hashlib # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\_hashlib.pyd
import _random # builtin
import cStringIO # builtin
import time # builtin
import datetime # builtin
import _socket # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\_socket.pyd
import _ssl # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\_ssl.pyd
import parser # builtin
import win32api # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\win32api.pyd
import pywintypes # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pywintypes27.dll
import pythoncom # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pythoncom27.dll
import pyproj._proj # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pyproj._proj.pyd
import numpy.core.multiarray # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.core.multiarray.pyd
import numpy.core.umath # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.core.umath.pyd
import cPickle # builtin
import numpy.core._dotblas # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.core._dotblas.pyd
import numpy.core.scalarmath # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.core.scalarmath.pyd
import numpy.lib._compiled_base # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.lib._compiled_base.pyd
import numpy.linalg.lapack_lite # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.linalg.lapack_lite.pyd
import numpy.linalg._umath_linalg # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.linalg._umath_linalg.pyd
import future_builtins # builtin
import numpy.fft.fftpack_lite # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.fft.fftpack_lite.pyd
import numpy.random.mtrand # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\numpy.random.mtrand.pyd
import pandas.hashtable # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.hashtable.pyd
import _winreg # builtin
import gc # builtin
import msvcrt # builtin
import _subprocess # builtin
import _bisect # builtin
import pandas.tslib # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.tslib.pyd
import pandas.lib # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.lib.pyd
import _csv # builtin
import pandas.algos # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.algos.pyd
import pandas.index # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.index.pyd
import pandas._period # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas._period.pyd
import pandas._sparse # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas._sparse.pyd
import matplotlib._path # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\matplotlib._path.pyd
import _ast # builtin
import pandas.parser # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.parser.pyd
import pandas.json # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.json.pyd
import pandas.msgpack # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas.msgpack.pyd
import pandas._testing # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI84482\pandas._testing.pyd
Traceback (most recent call last):
  File "<string>", line 13, in <module>
  File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "C:\Users\Hp\PycharmProjects\GISdev\build\gis_helper2\out00-PYZ.pyz\scipy.interpolate", line 145, in <module>
  File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "C:\Users\Hp\PycharmProjects\GISdev\build\gis_helper2\out00-PYZ.pyz\scipy.interpolate.interpolate", line 15, in <module>
  File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "C:\Users\Hp\PycharmProjects\GISdev\build\gis_helper2\out00-PYZ.pyz\scipy.linalg", line 172, in <module>
  File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "C:\Users\Hp\PycharmProjects\GISdev\build\gis_helper2\out00-PYZ.pyz\scipy.linalg.misc", line 5, in <module>
  File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "C:\Users\Hp\PycharmProjects\GISdev\build\gis_helper2\out00-PYZ.pyz\scipy.linalg.blas", line 155, in <module>
  File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyi_importers.py", line 409, in load_module
    module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
ImportError: DLL load failed: The specified module could not be found.
Praxis
  • 934
  • 2
  • 17
  • 31

1 Answers1

0

Just updating this problem. Apparently there can be issues with certain scipy modules and pyinstaller. Modules such as linalg and interpolate rely on fblas.py which may be missing in the PythonVersion\Lib\site-packages\scipy\linalg folder.

This is an issue with numpy. Installing numpy+mkl fixed this for me and copied the correct file to this directory.

Numpy+mkl can be found here. Be sure to uninstall previous version of numpy.

Praxis
  • 934
  • 2
  • 17
  • 31