PyInstaller和Pandas错误:pyi_rth_qt4plugins返回-1

时间:2016-03-18 21:53:03

标签: python-2.7 pandas pyinstaller

我一直在尝试使用pyinstaller将python脚本编译到exe中,但是在运行exe文件后我一直收到错误:

Traceback (most recent call last):
  File "<string>", line 43, in <module>
  File "c:\users\martin~1\appdata\local\temp\pip-build-arzhlv\pyinstaller\PyInst
aller\loader\pyimod03_importers.py", line 546, in load_module
ImportError: DLL load failed: The specified procedure could not be found.
pyi_rth_qt4plugins returned -1

我注释掉了我的整个脚本,所以我只在GetMBEPressure.py脚本中有这个:

from pandas import DataFrame as df
print("this is a test!")

我用以下代码编译它:

pyinstaller.exe -F --debug --clean GetMBEPressure.spec

我的spec文件如下:

# -*- mode: python -*-

block_cipher = None


a = Analysis(['GetMBEPressure.py'],
             pathex=['C:\\Users\\Public\\MBELogAnalysis'],
             binaries=None,
             datas=None,
             hiddenimports=['_socket'],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='GetMBEPressure',
          debug=True,
          strip=False,
          upx=True,
          console=True )

正在构建输出:

53 INFO: PyInstaller: 3.1.1
53 INFO: Python: 2.7.10
55 INFO: Platform: Windows-7-6.1.7601-SP1
55 INFO: wrote C:\Users\Public\MBELogAnalysis\GetMBEPressure.spec
55 INFO: UPX is not available.
56 INFO: Removing temporary files and cleaning cache in C:\Users\Martin\AppData\Roaming\pyinstaller
59 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Public\\MBELogAnalysis', 'C:\\Users\\Public\\MBELogAnalysis']
59 INFO: checking Analysis
59 INFO: Building Analysis because out00-Analysis.toc is non existent
59 INFO: Initializing module dependency graph...
65 INFO: Initializing module graph hooks...
215 INFO: running Analysis out00-Analysis.toc
220 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
  required by c:\python27\python.exe
319 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df.manifest
322 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest
322 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_f47c47b2f658b4a8.manifest
323 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest
325 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_f480bfaef65491a5.manifest
425 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_none ...
427 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57.manifest
427 INFO: Searching for file msvcr90.dll
427 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll
427 INFO: Searching for file msvcp90.dll
427 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll
427 INFO: Searching for file msvcm90.dll
427 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcm90.dll
527 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df.manifest
527 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest
529 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_f47c47b2f658b4a8.manifest
529 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest
529 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_f480bfaef65491a5.manifest
530 INFO: Adding redirect Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)
595 INFO: Analyzing C:\Users\Public\MBELogAnalysis\GetMBEPressure.py
2213 INFO: Processing pre-safe import module hook   _xmlplus
6188 INFO: Processing pre-safe import module hook   six.moves
7056 INFO: Processing pre-find module path hook   distutils
11687 INFO: Processing pre-find module path hook   site
11688 INFO: site: retargeting to fake-dir 'c:\\python27\\lib\\site-packages\\PyInstaller\\fake-modules'
11717 INFO: Processing pre-safe import module hook   win32com
76519 INFO: Looking for import hooks ...
76523 INFO: Processing hook   hook-distutils.py
76523 INFO: Processing hook   hook-OpenGL.py
76865 INFO: Processing hook   hook-sysconfig.py
76865 INFO: Processing hook   hook-OpenGL_accelerate.py
76866 INFO: Processing hook   hook-xml.py
76866 INFO: Processing hook   hook-PIL.py
76878 INFO: Excluding import 'FixTk'
76888 INFO: Excluding import 'Tkinter'
76898 INFO: Excluding import 'PyQt5'
76907 INFO: Excluding import 'PySide'
76917 INFO: Excluding import 'PyQt4'
76925 INFO: Processing hook   hook-gtk.py
76927 WARNING: Hidden import 'gtkglext' not found (probably old hook)
76930 WARNING: Hidden import 'gdkgl' not found (probably old hook)
76930 WARNING: Hidden import 'gdkglext' not found (probably old hook)
76931 WARNING: Hidden import 'gtk.gdk' not found (probably old hook)
76931 WARNING: Hidden import 'gtk.gtkgl' not found (probably old hook)
76931 WARNING: Hidden import 'gtk.gtkgl._gtkgl' not found (probably old hook)
76934 WARNING: Hidden import 'gtkgl' not found (probably old hook)
77198 INFO: Processing hook   hook-scipy.sparse.csgraph.py
77202 INFO: Processing hook   hook-zmq.py
77514 INFO: Excluding import 'zmq.libzmq'
77523 WARNING:   From zmq removing import zmq.libzmq
77524 INFO: Processing hook   hook-pycparser.py
77746 INFO: Processing hook   hook-scipy.io.matlab.py
77746 INFO: Processing hook   hook-jinja2.py
77763 INFO: Processing hook   hook-lxml.etree.py
77771 INFO: Processing hook   hook-httplib.py
77773 INFO: Processing hook   hook-tables.py
77773 INFO: Processing hook   hook-pydoc.py
77782 INFO: Excluding import 'Tkinter'
77789 WARNING:   From pydoc removing import Tkinter
77789 INFO: Processing hook   hook-pygments.py
79154 INFO: Processing hook   hook-PyQt4.py
79155 INFO: Processing hook   hook-jsonschema.py
79159 INFO: Processing hook   hook-_tkinter.py
79271 INFO: checking Tree
79271 INFO: Building Tree because out00-Tree.toc is non existent
79271 INFO: Building Tree out00-Tree.toc
79514 INFO: checking Tree
79516 INFO: Building Tree because out01-Tree.toc is non existent
79516 INFO: Building Tree out01-Tree.toc
79542 INFO: Processing hook   hook-docutils.py
80394 INFO: Processing hook   hook-matplotlib.backends.py
82099 INFO:   Matplotlib backend "GTK": ignored
    No module named _backend_gdk
83605 INFO:   Matplotlib backend "GTKAgg": ignored
    No module named _backend_gdk
85085 INFO:   Matplotlib backend "GTKCairo": ignored
    No module named _backend_gdk
86481 INFO:   Matplotlib backend "MacOSX": ignored
    cannot import name _macosx
87922 INFO:   Matplotlib backend "Qt4Agg": added
89352 INFO:   Matplotlib backend "Qt5Agg": added
90759 INFO:   Matplotlib backend "TkAgg": added
92276 INFO:   Matplotlib backend "WX": added
93832 INFO:   Matplotlib backend "WXAgg": added
94063 INFO:   Matplotlib backend "GTK3Cairo": ignored
    Gtk3 backend requires pygobject to be installed.
95471 INFO:   Matplotlib backend "GTK3Agg": ignored
    Gtk3 backend requires pygobject to be installed.
c:\python27\lib\site-packages\IPython\kernel\__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
98098 INFO:   Matplotlib backend "WebAgg": added
c:\python27\lib\site-packages\IPython\kernel\__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
100317 INFO:   Matplotlib backend "nbAgg": added
101774 INFO:   Matplotlib backend "agg": added
103197 INFO:   Matplotlib backend "cairo": added
103395 INFO:   Matplotlib backend "emf": ignored
    No module named backend_emf
104881 INFO:   Matplotlib backend "gdk": ignored
    No module named _backend_gdk
106296 INFO:   Matplotlib backend "pdf": added
107957 INFO:   Matplotlib backend "pgf": added
109375 INFO:   Matplotlib backend "ps": added
110783 INFO:   Matplotlib backend "svg": added
112191 INFO:   Matplotlib backend "template": added
112608 INFO: Processing hook   hook-PIL.Image.py
112909 INFO: Processing hook   hook-matplotlib.py
113111 INFO: Processing hook   hook-xml.dom.domreg.py
113112 INFO: Processing hook   hook-PyQt4.QtGui.py
113388 INFO: Processing hook   hook-pkg_resources.py
113792 INFO: Processing hook   hook-requests.py
113796 INFO: Processing hook   hook-scipy.linalg.py
113796 WARNING: Hidden import 'scipy.linalg.cython_blas' not found (probably old hook)
113797 WARNING: Hidden import 'scipy.linalg.cython_lapack' not found (probably old hook)
113797 INFO: Processing hook   hook-IPython.py
116625 INFO: Processing hook   hook-certifi.py
116628 INFO: Processing hook   hook-pytz.py
116700 INFO: Processing hook   hook-pywintypes.py
117264 INFO: Processing hook   hook-setuptools.py
117264 INFO: Processing hook   hook-PIL.SpiderImagePlugin.py
117274 INFO: Excluding import 'FixTk'
117282 INFO: Excluding import 'Tkinter'
117290 INFO: Processing hook   hook-encodings.py
117628 INFO: Processing hook   hook-sqlalchemy.py
117792 WARNING: Hidden import 'MySQLdb' not found (probably old hook)
117794 WARNING: Hidden import 'psycopg2' not found (probably old hook)
119279 INFO: Processing hook   hook-PyQt4.QtSvg.py
119282 INFO: Processing hook   hook-xml.etree.cElementTree.py
119282 INFO: Processing hook   hook-babel.py
119362 INFO: Processing hook   hook-patsy.py
119363 INFO: Processing hook   hook-sqlite3.py
119368 INFO: Processing hook   hook-PyQt4.QtCore.py
119425 INFO: Processing hook   hook-scipy.special._ufuncs.py
119427 INFO: Processing hook   hook-sphinx.py
125000 INFO: Processing hook   hook-idlelib.py
125013 INFO: Processing hook   hook-win32com.py
125172 INFO: Processing hook   hook-pythoncom.py
125960 INFO: Looking for ctypes DLLs
126246 INFO: Analyzing run-time hooks ...
126256 WARNING: Attempted to add Python module twice with different upper/lowercases: tkFileDialog
126256 WARNING: Attempted to add Python module twice with different upper/lowercases: tkMessageBox
126256 WARNING: Attempted to add Python module twice with different upper/lowercases: FileDialog
126257 WARNING: Attempted to add Python module twice with different upper/lowercases: Tkinter
126257 WARNING: Attempted to add Python module twice with different upper/lowercases: ConfigParser
126257 WARNING: Attempted to add Python module twice with different upper/lowercases: Queue
126257 WARNING: Attempted to add Python module twice with different upper/lowercases: UserString
126257 WARNING: Attempted to add Python module twice with different upper/lowercases: cStringIO
126257 WARNING: Attempted to add Python module twice with different upper/lowercases: cPickle
126257 WARNING: Attempted to add Python module twice with different upper/lowercases: StringIO
126284 WARNING: Attempted to add Python module twice with different upper/lowercases: HTMLParser
126297 INFO: Including run-time hook 'pyi_rth_pkgres.py'
126299 INFO: Including run-time hook 'pyi_rth__tkinter.py'
126300 INFO: Including run-time hook 'pyi_rth_qt4plugins.py'
126302 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
126303 INFO: Including run-time hook 'pyi_rth_mplconfig.py'
126305 INFO: Including run-time hook 'pyi_rth_mpldata.py'
126415 INFO: Looking for dynamic libraries
126869 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_5926f98ceadc42c2.manifest
126869 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.1_none_7dd1e0ebd6590e0b.manifest
126871 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_ed01d9e4fb230e88.manifest
126970 INFO: Searching for assembly x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.30729.6161_none ...
126970 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_4bf7e3e2bf9ada4c.manifest
126971 INFO: Searching for file mfc90.dll
126971 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_4bf7e3e2bf9ada4c\mfc90.dll
126971 INFO: Searching for file mfc90u.dll
126971 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_4bf7e3e2bf9ada4c\mfc90u.dll
126971 INFO: Searching for file mfcm90.dll
126973 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_4bf7e3e2bf9ada4c\mfcm90.dll
126973 INFO: Searching for file mfcm90u.dll
126973 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_4bf7e3e2bf9ada4c\mfcm90u.dll
127069 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_5926f98ceadc42c2.manifest
127069 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.1_none_7dd1e0ebd6590e0b.manifest
127070 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_ed01d9e4fb230e88.manifest
127072 INFO: Adding redirect Microsoft.VC90.MFC version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt4.QtCore
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt4.QtSvg
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt4.QtGui
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.vbo
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.formathandler
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.arraydatatype
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.wrapper
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.latebind
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.errorchecker
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.numpy_formathandler
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.nones_formathandler
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: OpenGL_accelerate.buffers_formathandler
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Cipher._DES3
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Util._counter
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.PublicKey._fastmath
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Cipher._DES
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Util.strxor
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Hash._SHA256
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Random.OSRNG.winrandom
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Cipher._AES
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Cipher._Blowfish
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Crypto.Cipher._ARC4
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: PIL._webp
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: PIL._imagingtk
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: PIL._imaging
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: PIL._imagingft
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: scipy.optimize.moduleTNC
130746 WARNING: Attempted to add Python module twice with different upper/lowercases: Stemmer
130747 WARNING: Attempted to add Python module twice with different upper/lowercases: Cython.Compiler.Scanning
130747 WARNING: Attempted to add Python module twice with different upper/lowercases: Cython.Compiler.Parsing
130747 WARNING: Attempted to add Python module twice with different upper/lowercases: Cython.Compiler.Code
130747 WARNING: Attempted to add Python module twice with different upper/lowercases: Cython.Compiler.Visitor
130747 WARNING: Attempted to add Python module twice with different upper/lowercases: Cython.Compiler.FlowControl
130747 INFO: Looking for eggs
130747 INFO: Using Python library C:\Users\Public\MBELogAnalysis\python27.dll
130747 INFO: Found binding redirects: 
[BindingRedirect(name=u'Microsoft.VC90.MFC', language=None, arch=u'x86', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 6161), publicKeyToken=u'1fc8b3b9a1e18e3b'), BindingRedirect(name=u'Microsoft.VC90.CRT', language=None, arch=u'x86', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 6161), publicKeyToken=u'1fc8b3b9a1e18e3b')]
130848 INFO: Warnings written to C:\Users\Public\MBELogAnalysis\build\GetMBEPressure\warnGetMBEPressure.txt
132418 INFO: checking PYZ
132418 INFO: Building PYZ because out00-PYZ.toc is non existent
132418 INFO: Building PYZ (ZlibArchive) C:\Users\Public\MBELogAnalysis\build\GetMBEPressure\out00-PYZ.pyz
136802 INFO: checking PKG
136802 INFO: Building PKG because out00-PKG.toc is non existent
136802 INFO: Building PKG (CArchive) out00-PKG.pkg
138115 INFO: Redirecting Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)
175003 INFO: Bootloader c:\python27\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run_d.exe
175003 INFO: checking EXE
175003 INFO: Building EXE because out00-EXE.toc is non existent
175003 INFO: Building EXE from out00-EXE.toc
175006 INFO: Appending archive to EXE C:\Users\Public\MBELogAnalysis\dist\GetMBEPressure.exe

当我运行exe时,它给出了输出:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Public\MBELogAnalysis\dist>GetMBEPressure
PyInstaller Bootloader 3.x
LOADER: executable is C:\Users\Public\MBELogAnalysis\dist\GetMBEPressure.exe
LOADER: homepath is C:\Users\Public\MBELogAnalysis\dist
LOADER: _MEIPASS2 is NULL
LOADER: archivename is C:\Users\Public\MBELogAnalysis\dist\GetMBEPressure.exe
LOADER: Extracting binaries
LOADER: Executing self as child
LOADER: set _MEIPASS2 to C:\Users\MARTIN~1\AppData\Local\Temp\_MEI76482
LOADER: Setting up to run child
LOADER: Creating child process
LOADER: Waiting for child process to finish...
PyInstaller Bootloader 3.x
LOADER: executable is C:\Users\Public\MBELogAnalysis\dist\GetMBEPressure.exe
LOADER: homepath is C:\Users\Public\MBELogAnalysis\dist
LOADER: _MEIPASS2 is C:\Users\MARTIN~1\AppData\Local\Temp\_MEI76482
LOADER: archivename is C:\Users\Public\MBELogAnalysis\dist\GetMBEPressure.exe
LOADER: SetDllDirectory(C:\Users\MARTIN~1\AppData\Local\Temp\_MEI76482)
LOADER: Already in the child - running user's code.
LOADER: manifestpath: C:\Users\MARTIN~1\AppData\Local\Temp\_MEI76482\GetMBEPress
ure.exe.manifest
LOADER: Activation context created
LOADER: Activation context activated
LOADER: Python library: C:\Users\MARTIN~1\AppData\Local\Temp\_MEI76482\python27.
dll
LOADER: Loaded functions from Python library.
LOADER: Manipulating environment (sys.path, sys.prefix)
LOADER: sys.prefix is C:\Users\MARTIN~1\AppData\Local\Temp\_MEI76~1
LOADER: Setting runtime options
LOADER: Bootloader option: pyi-windows-manifest-filename GetMBEPressure.exe.mani
fest
LOADER: Initializing python
LOADER: Overriding Python's sys.path
LOADER: Post-init sys.path is C:\Users\MARTIN~1\AppData\Local\Temp\_MEI76482
LOADER: Setting sys.argv
LOADER: setting sys._MEIPASS
LOADER: importing modules from CArchive
LOADER: extracted struct
LOADER: callfunction returned...
LOADER: extracted pyimod01_os_path
LOADER: callfunction returned...
LOADER: extracted pyimod02_archive
LOADER: callfunction returned...
LOADER: extracted pyimod03_importers
LOADER: callfunction returned...
LOADER: Installing PYZ archive with Python modules.
LOADER: PYZ archive: out00-PYZ.pyz
LOADER: Running pyiboot01_bootstrap.py
LOADER: Running pyi_rth_pkgres.py
LOADER: Running pyi_rth__tkinter.py
LOADER: Running pyi_rth_qt4plugins.py
Traceback (most recent call last):
  File "<string>", line 43, in <module>
  File "c:\users\martin~1\appdata\local\temp\pip-build-arzhlv\pyinstaller\PyInst
aller\loader\pyimod03_importers.py", line 546, in load_module
ImportError: DLL load failed: The specified procedure could not be found.
pyi_rth_qt4plugins returned -1
LOADER: OK.
LOADER: Cleaning up Python interpreter.
LOADER: Back to parent (RC: -1)
LOADER: Doing cleanup
LOADER: Freeing archive status for C:\Users\Public\MBELogAnalysis\dist\GetMBEPre
ssure.exe

我试图谷歌这个问题并尝试了对.spec文件的各种解决方案和修改但似乎没有任何效果。对类似问题here的解决方案也不适用于我。我得到相同的错误或出现新的错误。关于我接下来可以尝试的任何帮助或建议将不胜感激。谢谢!

1 个答案:

答案 0 :(得分:0)

我有一些随机问题,pyinstaller没有正确导入东西,直到看到几篇关于抓取最新开发者分支而不是使用最新版本的帖子: pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

此外,在切换到新的开发机器时,我再遇到类似的问题。这一次,上述解决方案并没有奏效。相反,这是一个类似于https://github.com/pyinstaller/pyinstaller/issues/1404的新问题 将单个动态库文件重命名为pyinstaller构建的exe无法识别的内容。就我而言,我的旧机器使用&#34; libzmq.pyd&#34;生成了一个版本。在exe的目录中,但新机器改为使用文件&#34; zmq.libzmq.pyd&#34;。我确定在某个地方有更好的解决方案,但是将该文件重命名为&#34; libzmq.pyd&#34;做了诀窍,exe将在新机器上正确运行。构建目录中有任何奇怪命名的动态库吗?