你好
我在Pyinstaller上几乎没有问题,但是我发现了除此以外的所有解决方案!,所以我正在使用Windows 10,并且我正在使用PYQT5编写程序,我想使用Pyinstaller使其成为exe,但是在这里是我尝试打开exe时得到的:
File "site-packages\PyInstaller\loader\rthooks\pyi_rth_qt5.py", line 61, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
ValueError: PyCapsule_GetPointer called with incorrect name
[17624] Failed to execute script pyi_rth_qt5
这是制作exe时的pyinstaller:
241 INFO: PyInstaller: 3.3.1
241 INFO: Python: 3.6.5
243 INFO: Platform: Windows-10-10.0.17134-SP0
249 INFO: wrote C:\Users\Owner\Desktop\backup\start.spec
252 INFO: UPX is not available.
255 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Owner\\Desktop\\backup', 'C:\\Users\\Owner\\Desktop\\backup']
255 INFO: checking Analysis
256 INFO: Building Analysis because out00-Analysis.toc is non existent
256 INFO: Initializing module dependency graph...
260 INFO: Initializing module graph hooks...
264 INFO: Analyzing base_library.zip ...
13620 INFO: running Analysis out00-Analysis.toc
13638 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\owner\appdata\local\programs\python\python36\python.exe
15255 INFO: Caching module hooks...
15262 INFO: Analyzing C:\Users\Owner\Desktop\backup\start.py
15558 INFO: Processing pre-find module path hook PyQt5.uic.port_v3
15618 INFO: Processing pre-find module path hook PyQt5.uic.port_v2
16457 INFO: Processing pre-safe import module hook urllib3.packages.six.moves
44869 INFO: Processing pre-safe import module hook six.moves
46840 INFO: Processing pre-find module path hook distutils
52603 INFO: Loading module hooks...
52603 INFO: Loading module hook "hook-certifi.py"...
52607 INFO: Loading module hook "hook-distutils.py"...
52608 INFO: Loading module hook "hook-encodings.py"...
52740 INFO: Loading module hook "hook-httplib2.py"...
52742 INFO: Loading module hook "hook-lib2to3.py"...
52750 INFO: Loading module hook "hook-pkg_resources.py"...
54197 INFO: Processing pre-safe import module hook win32com
54406 INFO: Loading module hook "hook-pydoc.py"...
54407 INFO: Loading module hook "hook-PyQt5.py"...
54411 INFO: Loading module hook "hook-PyQt5.Qt.py"...
54413 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
54523 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
55082 INFO: Loading module hook "hook-PyQt5.QtPrintSupport.py"...
55177 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
55178 INFO: Loading module hook "hook-PyQt5.uic.py"...
55184 INFO: Loading module hook "hook-pythoncom.py"...
55586 INFO: Loading module hook "hook-pywintypes.py"...
56077 INFO: Loading module hook "hook-requests.py"...
56080 INFO: Loading module hook "hook-sysconfig.py"...
56082 INFO: Loading module hook "hook-win32com.py"...
57600 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
57601 INFO: Loading module hook "hook-xml.py"...
57950 INFO: Looking for ctypes DLLs
58133 INFO: Analyzing run-time hooks ...
58146 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
58170 INFO: Including run-time hook 'pyi_rth_pkgres.py'
58192 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
58236 INFO: Including run-time hook 'pyi_rth_qt5.py'
58284 INFO: Looking for dynamic libraries
60458 INFO: Looking for eggs
60458 INFO: Using Python library c:\users\owner\appdata\local\programs\python\python36\python36.dll
60459 INFO: Found binding redirects:
[]
60477 INFO: Warnings written to C:\Users\Owner\Desktop\backup\build\start\warnstart.txt
60798 INFO: Graph cross-reference written to C:\Users\Owner\Desktop\backup\build\start\xref-start.html
60970 INFO: checking PYZ
60971 INFO: Building PYZ because out00-PYZ.toc is non existent
60971 INFO: Building PYZ (ZlibArchive) C:\Users\Owner\Desktop\backup\build\start\out00-PYZ.pyz
62748 INFO: Building PYZ (ZlibArchive) C:\Users\Owner\Desktop\backup\build\start\out00-PYZ.pyz completed successfully.
62830 INFO: checking PKG
62830 INFO: Building PKG because out00-PKG.toc is non existent
62831 INFO: Building PKG (CArchive) out00-PKG.pkg
62872 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
62880 INFO: Bootloader c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
62880 INFO: checking EXE
62881 INFO: Building EXE because out00-EXE.toc is non existent
62881 INFO: Building EXE from out00-EXE.toc
62883 INFO: Appending archive to EXE C:\Users\Owner\Desktop\backup\build\start\start.exe
63024 INFO: Building EXE from out00-EXE.toc completed successfully.
63034 INFO: checking COLLECT
63035 INFO: Building COLLECT because out00-COLLECT.toc is non existent
63035 INFO: Building COLLECT out00-COLLECT.toc
69123 INFO: Building COLLECT out00-COLLECT.toc completed successfully.
您可以看到没有警告。