Python - PyInstaller无法执行pyi_rth_pyqt5plugins

时间:2017-03-26 00:29:50

标签: python qt pyqt5 pyinstaller

我正在尝试使用PyInstaller将Python脚本冻结为.exe文件。试图在冻结它之前运行脚本,并没有发现错误。但是,在使用PyInstaller冻结脚本后,它会返回错误,无法执行脚本pyi_rth_qt5plugins

the error message when the program is ran

如果我在PyInstaller运行时检查WARNING消息,我发现没有与PyQt5相关的重要错误消息,即使所有挂钩都已成功加载。以下是信息。

25120 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
25120 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
25527 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
25527 INFO: Loading module hook "hook-pkg_resources.py"...
25542 INFO: Loading module hook "hook-distutils.py"...
25558 INFO: Loading module hook "hook-lib2to3.py"...
25573 INFO: Loading module hook "hook-numpy.core.py"...
25698 INFO: Loading module hook "hook-win32com.py"...
26370 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
26433 INFO: Loading module hook "hook-pydoc.py"...
26433 INFO: Loading module hook "hook-pytz.py"...
26667 INFO: Loading module hook "hook-PyQt5.py"...
26667 INFO: Loading module hook "hook-encodings.py"...
26745 INFO: Loading module hook "hook-pythoncom.py"...
26949 INFO: Loading module hook "hook-sysconfig.py"...
26949 INFO: Loading module hook "hook-pywintypes.py"...
27199 INFO: Loading module hook "hook-PyQt5.Qt.py"...
27199 INFO: Loading module hook "hook-setuptools.py"...
27199 INFO: Loading module hook "hook-sqlite3.py"...
27292 INFO: Loading module hook "hook-xml.py"...
27402 INFO: Loading module hook "hook-PyQt5.QtPrintSupport.py"...
27558 INFO: checking Tree
27558 INFO: Building Tree because out00-Tree.toc is non existent
27558 INFO: Building Tree out00-Tree.toc
27589 INFO: Looking for ctypes DLLs
27620 INFO: Analyzing run-time hooks ...
27636 INFO: Including run-time hook 'pyi_rth_qt5.py'
27636 INFO: Including run-time hook 'pyi_rth_qt5plugins.py'
27652 INFO: Including run-time hook 'pyi_rth_pkgres.py'
27652 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
...
27761 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
27855 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
27964 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
28042 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
28121 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
28246 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
28324 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
28402 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtga.dll
28496 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtga.dll
28574 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtga.dll
28667 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
28761 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
28839 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
28933 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
29011 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
29089 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
29183 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
29277 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
29355 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
29433 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
29527 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
29636 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
29730 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
29839 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qicns.dll
29918 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qicns.dll
29996 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qicns.dll
30105 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwbmp.dll
30199 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwbmp.dll
30277 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
30371 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
30496 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
30574 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
30668 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
30746 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
30824 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
30918 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
30996 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
31090 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
31168 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
31246 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
31355 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qsvg.dll
31449 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qsvg.dll
31543 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\iconengines\qsvgicon.dll
31621 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\iconengines\qsvgicon.dll
31715 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
31840 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
31918 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qico.dll
32012 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\imageformats\qico.dll
32105 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\printsupport\windowsprintersupport.dll
32188 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\Qt\plugins\printsupport\windowsprintersupport.dll
32407 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\AppData\Local\Programs\Python\Python35\DLLs\_multiprocessing.pyd
32548 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\QtCore.pyd
32641 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\QtCore.pyd
32719 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\QtCore.pyd
32813 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Users\Arnold\Envs\pdproduction\lib\site-packages\PyQt5\QtCore.pyd

最后,如果我查看build文件夹中的警告txt文件,我发现了此消息。

missing module named 'PyQt5.sip' - imported by C:\Users\Arnold\Envs\pdproduction\lib\site-packages\pyinstaller-3.3.dev0+82fb738-py3.5.egg\PyInstaller\loader\rthooks\pyi_rth_qt5plugins.py

目前我正在使用Windows 10Python 3.5.1pandas 0.19.2PyQt5 5.8.1Qt 5.8.0SIP 4.19.1PyInstaller 3.3dev。到目前为止我尝试过的尝试:

  1. 将PyQt5版本降级为较低版本,但每次执行脚本时它都会崩溃。尝试使用PyQt5 5.6和PyQt5 5.7。因此,我坚持使用PyQt5 5.8
  2. 卸载并安装SIP,不起作用。
  3. 任何建议都将不胜感激。谢谢!

    P.S。如果我尝试使用Anaconda冻结程序,那么一切都很好。但是,exe文件的大小是巨大的!它几乎是200Mb!但是如果我尝试在纯Python中冻结它,没有Anaconda,那么文件大小是可以接受的,大约37Mb。因此,我更喜欢在Anaconda中冻结它。

0 个答案:

没有答案