我希望有人可以帮我调试pyinstall中的以下错误消息。
我试图将脚本编译为exe并且已经处理了隐藏模块数日,但是我遇到了一条新的错误消息,这似乎是一个缺失的.dll文件。
问题是,我无法分辨哪一个导致问题。希望有人在编译方面有经验可以帮助我调试此错误消息。看看追溯,' scipy.interpolate'和' scipy.linalg'看起来很重要但是,我已将它们包含在pyinstall的.spec文件中,并且它不会更改输出。
该脚本使用GDAL,因此我在构建文件夹中包含了gdal111.dll,geos_c.dll。
我还通过依赖性walker运行脚本但是我不知道自己在做什么或要查找什么。这是DLL的屏幕截图。也许这对我来说并不明显,但它们看起来不像蟒蛇。
# 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.
答案 0 :(得分:0)
刚刚更新此问题。显然,某些scipy模块和pyinstaller可能存在问题。诸如linalg和interpolate之类的模块依赖于fblas.py,它可能在PythonVersion \ Lib \ site-packages \ scipy \ linalg文件夹中丢失。
这是numpy的一个问题。安装numpy + mkl为我修复此问题并将正确的文件复制到此目录。
可以找到Numpy + mkl here。请务必卸载以前版本的numpy。