pycharm+python3.7+pyqt5+tk程序打包报错
pyinstaller指令如下:
pyinstaller -Fw --path D:\Users\randongmei\Anaconda3\Lib\site-packages\PyQt5\Qt\bin M_main.py
打包时输出信息:
(base) D:\PycharmCode\CompareLayerLine>pyinstaller -Fw --path D:\Users\randongmei\Anaconda3\Lib\site-packages\PyQt5\Qt\bin M_main.py
66 INFO: PyInstaller: 3.5
66 INFO: Python: 3.7.0
67 INFO: Platform: Windows-10-10.0.17763-SP0
68 INFO: wrote D:\PycharmCode\CompareLayerLine\M_main.spec
75 INFO: UPX is not available.
76 INFO: Extending PYTHONPATH with paths
['D:\\PycharmCode\\CompareLayerLine',
'D:\\Users\\randongmei\\Anaconda3\\Lib\\site-packages\\PyQt5\\Qt\\bin',
'D:\\PycharmCode\\CompareLayerLine']
77 INFO: checking Analysis
77 INFO: Building Analysis because Analysis-00.toc is non existent
77 INFO: Initializing module dependency graph...
82 INFO: Initializing module graph hooks...
84 INFO: Analyzing base_library.zip ...
3592 INFO: running Analysis Analysis-00.toc
3606 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by d:\users\randongmei\anaconda3\python.exe
3911 INFO: Caching module hooks...
3915 INFO: Analyzing D:\PycharmCode\CompareLayerLine\M_main.py
4220 INFO: Loading module hooks...
4220 INFO: Loading module hook "hook-encodings.py"...
4384 INFO: Loading module hook "hook-pydoc.py"...
4384 INFO: Loading module hook "hook-PyQt5.py"...
4524 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
4606 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
4743 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
5041 INFO: Loading module hook "hook-xml.py"...
5287 INFO: Loading module hook "hook-_tkinter.py"...
5494 INFO: checking Tree
5495 INFO: Building Tree because Tree-00.toc is non existent
5495 INFO: Building Tree Tree-00.toc
5546 INFO: checking Tree
5546 INFO: Building Tree because Tree-01.toc is non existent
5547 INFO: Building Tree Tree-01.toc
5565 INFO: Looking for ctypes DLLs
5565 INFO: Analyzing run-time hooks ...
5568 INFO: Including run-time hook 'pyi_rth__tkinter.py'
5569 INFO: Including run-time hook 'pyi_rth_pyqt5.py'
5572 INFO: Looking for dynamic libraries
6452 INFO: Looking for eggs
6452 INFO: Using Python library d:\users\randongmei\anaconda3\python37.dll
6452 INFO: Found binding redirects:
[]
6455 INFO: Warnings written to D:\PycharmCode\CompareLayerLine\build\M_main\warn-M_main.txt
6480 INFO: Graph cross-reference written to D:\PycharmCode\CompareLayerLine\build\M_main\xref-M_main.html
6948 INFO: checking PYZ
6948 INFO: Building PYZ because PYZ-00.toc is non existent
6949 INFO: Building PYZ (ZlibArchive) D:\PycharmCode\CompareLayerLine\build\M_main\PYZ-00.pyz
7357 INFO: Building PYZ (ZlibArchive) D:\PycharmCode\CompareLayerLine\build\M_main\PYZ-00.pyz completed successfully.
7364 INFO: checking PKG
7364 INFO: Building PKG because PKG-00.toc is non existent
7364 INFO: Building PKG (CArchive) PKG-00.pkg
7625 WARNING: One binary added with two internal names.
7625 WARNING: ('libGLESv2.dll',
'D:\\users\\randongmei\\anaconda3\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
'BINARY')
7626 WARNING: was placed previously at
7626 WARNING: ('PyQt5\\Qt\\bin\\libGLESv2.dll',
'D:\\users\\randongmei\\anaconda3\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
'BINARY')
19000 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
19020 INFO: Bootloader d:\users\randongmei\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
19021 INFO: checking EXE
19021 INFO: Building EXE because EXE-00.toc is non existent
19021 INFO: Building EXE from EXE-00.toc
19026 INFO: Appending archive to EXE D:\PycharmCode\CompareLayerLine\dist\M_main.exe
19050 INFO: Building EXE from EXE-00.toc completed successfully.
build文件夹下面的
warn-**.txt显示错误信息
missing module named resource - imported by posix (top-level), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named posix - imported by os (conditional, optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named _posixsubprocess - imported by subprocess (conditional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named 'org.python' - imported by pickle (optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level), xml.sax (delayed, conditional)
missing module named readline - imported by cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named _winreg - imported by platform (delayed, optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named _scproxy - imported by urllib.request (conditional)
missing module named java - imported by platform (delayed), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named 'java.lang' - imported by platform (delayed, optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level), xml.sax._exceptions (conditional)
missing module named vms_lib - imported by platform (delayed, conditional, optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named termios - imported by tty (top-level), D:\PycharmCode\CompareLayerLine\compare.py (top-level), getpass (optional)
missing module named grp - imported by shutil (optional), tarfile (optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
missing module named pwd - imported by posixpath (delayed, conditional), shutil (optional), tarfile (optional), http.server (delayed, optional), webbrowser (delayed), D:\PycharmCode\CompareLayerLine\compare.py (top-level), netrc (delayed, conditional), getpass (delayed)
missing module named org - imported by copy (optional), D:\PycharmCode\CompareLayerLine\compare.py (top-level)
在网上收集很多资料都没有解决,知乎上面说目前pyinstaller不能打包pyqt5和tk带图形界面的框架
后期继续研究………………
错误现象:failed to execute script **