Pyinstaller DLL加载失败:找不到指定的过程

时间:2017-12-11 10:04:24

标签: python-3.x pyqt5 pyinstaller

大家好。

我正在尝试为小型桌面应用制作一个.exe包。

我正在使用python 35,PyQt5和Pyinstaller 3.4.dev0 + 97ce49bad。

当我运行Pyinstaller时,它会显示:

D:\SlowControl>pyinstaller --onefile --paths D:\Python35\Li
b\site-packages Slow_control.py
90 INFO: PyInstaller: 3.4.dev0+97ce49bad
90 INFO: Python: 3.5.2
90 INFO: Platform: Windows-7-6.1.7601-SP1
90 INFO: wrote D:\SlowControl\Slow_control.spec
90 INFO: UPX is not available.
115 INFO: Extending PYTHONPATH with paths
['D:\\SlowControl',
 'D:\\Python35\\Lib\\site-packages',
 'D:\\SlowControl']
115 INFO: checking Analysis
115 INFO: Building Analysis because out00-Analysis.toc is non existent
115 INFO: Initializing module dependency graph...
120 INFO: Initializing module graph hooks...
125 INFO: Analyzing base_library.zip ...
4295 INFO: running Analysis out00-Analysis.toc
5185 INFO: Caching module hooks...
5190 INFO: Analyzing D:\SlowControl\Slow_control.py
5305 INFO: Processing pre-find module path hook   distutils
5460 INFO: Processing pre-safe import module hook   six.moves
7845 INFO: Processing pre-find module path hook   site
7845 INFO: site: retargeting to fake-dir 'D:\\Python35\\lib\\site-packages\\pyin
staller-3.4.dev0+97ce49bad-py3.5.egg\\PyInstaller\\fake-modules'
7880 INFO: Processing pre-safe import module hook   win32com
15995 INFO: Loading module hooks...
15995 INFO: Loading module hook "hook-pkg_resources.py"...
16610 INFO: Loading module hook "hook-encodings.py"...
16780 INFO: Loading module hook "hook-numpy.core.py"...
16860 INFO: Loading module hook "hook-pytz.py"...
16930 INFO: Loading module hook "hook-pythoncom.py"...
17160 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
17695 INFO: Loading module hook "hook-xml.py"...
17695 INFO: Loading module hook "hook-sysconfig.py"...
17695 INFO: Loading module hook "hook-matplotlib.py"...
18140 INFO: Loading module hook "hook-distutils.py"...
18150 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
18235 INFO: Loading module hook "hook-lib2to3.py"...
18290 INFO: Loading module hook "hook-pywintypes.py"...
18535 INFO: Loading module hook "hook-PyQt5.py"...
18535 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
18540 INFO: Loading module hook "hook-matplotlib.backends.py"...
19220 INFO:   Matplotlib backend "GTK": ignored
    Gtk* backend requires pygtk to be installed.
20280 INFO:   Matplotlib backend "GTKAgg": ignored
    Gtk* backend requires pygtk to be installed.
20690 INFO:   Matplotlib backend "GTKCairo": ignored
    No module named 'gtk'
21155 INFO:   Matplotlib backend "MacOSX": ignored
    cannot import name '_macosx'
21975 INFO:   Matplotlib backend "Qt4Agg": added
22580 INFO:   Matplotlib backend "Qt5Agg": added
23210 INFO:   Matplotlib backend "TkAgg": added
23700 INFO:   Matplotlib backend "WX": ignored
    Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.12
24165 INFO:   Matplotlib backend "WXAgg": ignored
    Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.12
24490 INFO:   Matplotlib backend "GTK3Cairo": ignored
    Cairo backend requires that cairocffi or pycairo is installed.
24960 INFO:   Matplotlib backend "GTK3Agg": ignored
    Gtk3 backend requires pygobject to be installed.
25280 INFO:   Matplotlib backend "WebAgg": ignored
    Traceback (most recent call last):
  File "D:\Python35\Lib\site-packages\matplotlib\backends\backend_webagg.py", li
ne 29, in <module>
    import tornado
ImportError: No module named 'tornado'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 12, in <module>
  File "D:\Python35\Lib\site-packages\matplotlib\backends\backend_webagg.py", li
ne 31, in <module>
    raise RuntimeError("The WebAgg backend requires Tornado.")
RuntimeError: The WebAgg backend requires Tornado.
25625 INFO:   Matplotlib backend "nbAgg": ignored
    No module named 'tornado'
26095 INFO:   Matplotlib backend "agg": added
26420 INFO:   Matplotlib backend "cairo": ignored
    Cairo backend requires that cairocffi or pycairo is installed.
26740 INFO:   Matplotlib backend "gdk": ignored
    No module named 'gobject'
27245 INFO:   Matplotlib backend "pdf": added
27810 INFO:   Matplotlib backend "pgf": added
28390 INFO:   Matplotlib backend "ps": added
28870 INFO:   Matplotlib backend "svg": added
29335 INFO:   Matplotlib backend "template": added
29925 INFO: Loading module hook "hook-win32com.py"...
30030 INFO: Loading module hook "hook-setuptools.py"...
30030 WARNING: Hidden import "setuptools.msvc" not found!
30030 INFO: Loading module hook "hook-pydoc.py"...
30040 INFO: Loading module hook "hook-_tkinter.py"...
30220 INFO: checking Tree
30220 INFO: Building Tree because out00-Tree.toc is non existent
30220 INFO: Building Tree out00-Tree.toc
30275 INFO: checking Tree
30275 INFO: Building Tree because out01-Tree.toc is non existent
30275 INFO: Building Tree out01-Tree.toc
30280 INFO: Loading module hook "hook-PyQt5.Qt.py"...
30285 INFO: Loading module hook "hook-PyQt5.QtPrintSupport.py"...
30420 INFO: checking Tree
30420 INFO: Building Tree because out02-Tree.toc is non existent
30420 INFO: Building Tree out02-Tree.toc
30430 INFO: Looking for ctypes DLLs
30505 INFO: Analyzing run-time hooks ...
30515 INFO: Including run-time hook 'pyi_rth_qt5.py'
30530 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
30535 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
30540 INFO: Including run-time hook 'pyi_rth_pkgres.py'
30540 INFO: Including run-time hook 'pyi_rth__tkinter.py'
30545 INFO: Including run-time hook 'pyi_rth_mplconfig.py'
30545 INFO: Including run-time hook 'pyi_rth_mpldata.py'
30565 INFO: Looking for dynamic libraries
35095 INFO: Looking for eggs
35095 INFO: Using Python library D:\Python35\python35.dll
35095 INFO: Found binding redirects:
[]
35130 INFO: Warnings written to D:\SlowControl\build\Slow_c
ontrol\warnSlow_control.txt
35360 INFO: Graph cross-reference written to D:\SlowControl
\build\Slow_control\xref-Slow_control.html
35460 INFO: checking PYZ
35460 INFO: Building PYZ because out00-PYZ.toc is non existent
35460 INFO: Building PYZ (ZlibArchive) D:\SlowControl\build
\Slow_control\out00-PYZ.pyz
37900 INFO: Building PYZ (ZlibArchive) D:\SlowControl\build
\Slow_control\out00-PYZ.pyz completed successfully.
37950 INFO: checking PKG
37955 INFO: Building PKG because out00-PKG.toc is non existent
37955 INFO: Building PKG (CArchive) out00-PKG.pkg
58380 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
58465 INFO: Bootloader D:\Python35\lib\site-packages\pyinstaller-3.4.dev0+97ce49
bad-py3.5.egg\PyInstaller\bootloader\Windows-64bit\run.exe
58465 INFO: checking EXE
58465 INFO: Building EXE because out00-EXE.toc is non existent
58465 INFO: Building EXE from out00-EXE.toc
58465 INFO: Appending archive to EXE D:\SlowControl\dist\Sl
ow_control.exe
58520 INFO: Building EXE from out00-EXE.toc completed successfully.

当我尝试启动SlowControl.exe时,显示

Traceback (most recent call last):
  File "Slow_control.py", line 2, in <module>
  File "D:\Python35\lib\site-packages\pyinstaller-3.4.dev0+97ce49bad-py3.5.egg\P
yInstaller\loader\pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "Lib\site-packages\matplotlib\pyplot.py", line 109, in <module>
  File "Lib\site-packages\matplotlib\pyplot.py", line 91, in _backend_selection
  File "D:\Python35\lib\site-packages\pyinstaller-3.4.dev0+97ce49bad-py3.5.egg\P
yInstaller\loader\pyimod03_importers.py", line 714, in load_module
    module = loader.load_module(fullname)
ImportError: DLL load failed: The specified procedure could not be found.
[1596] Failed to execute script Slow_control

我不确定但问题可能是隐藏的进口问题? 如果是这样,有人可以解释隐藏哪些文件?我只是不明白。

提前致谢!

0 个答案:

没有答案