[PyQt] build exe using pyinstaller

First, you may need to install PyInstaller:

pip install pyinstaller

PyInstaller official document: PyInstaller Manual
build command:

pyinstaller [opt] [要打包的程序.py]

Optional opt are:

  • -D, -–onedirCreate a directory that contains exe file, but a lot will depend on the file (the default option).
  • -F, -–onefilePackaged into an exe file.
  • -c, –console, -Nowindowed using the console, no interface (default)
  • -w, -–windowed, -Noconsole use the window, no console

WARNING and build solutions obtained in the course:

  • ctypes imports are only supported using bare filenames
    Removing the reference path in front of or DLL ./
  • lib not found: mfc90.dll dependency of 路径\ControlCAN.dll
  • lib not found: MSVCR90.dll dependency of 路径\ControlCAN.dll
  • One binary added with two internal names.
    29025 WARNING: ('libGLESv2.dll',
     'D:\\python37\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
     'BINARY')
    
  • was placed previously at
    29026 WARNING: ('PyQt5\\Qt\\bin\\libGLESv2.dll',
     'D:\\python37\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
     'BINARY')
    
  • failed to execute script
    Some people say the problem is encoded, into GBK try ...... but still not enough
    λ pchcp
    活动代码页: 936
    

In other packaged on his laptop, more incredible ...... what a mess the computer company may have installed, so for dependencies do not feel that this change to the new environment, the issue suddenly exposed

$ pyinstaller -Fw main.py
249 INFO: PyInstaller: 3.4
249 INFO: Python: 3.7.3
249 INFO: Platform: Windows-10-10.0.17763-SP0
265 INFO: wrote E:\qt\pyqt\CANdataSender\main.spec
265 INFO: UPX is not available.
281 INFO: Extending PYTHONPATH with paths
['E:\\qt\\pyqt\\CANdataSender', 'E:\\qt\\pyqt\\CANdataSender']
281 INFO: checking Analysis
281 INFO: Building Analysis because Analysis-00.toc is non existent
296 INFO: Initializing module dependency graph...
296 INFO: Initializing module graph hooks...
296 INFO: Analyzing base_library.zip ...
8202 INFO: running Analysis Analysis-00.toc
8265 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\python\python.exe
8311 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\python.exe
8405 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\python.exe
8468 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\python.exe
8514 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\python.exe
8577 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\python\python.exe
8655 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\python\VCRUNTIME140.dll
8702 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\VCRUNTIME140.dll
8764 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\VCRUNTIME140.dll
8811 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\VCRUNTIME140.dll
8874 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\VCRUNTIME140.dll
8983 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\python\python37.dll
9030 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\python37.dll
9093 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\python\python37.dll
9155 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\python\python37.dll
9202 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\python\python37.dll
9264 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\python\python37.dll
9311 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\python37.dll
9374 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\python37.dll
9436 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\python37.dll
9483 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\python\python37.dll
9546 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\python37.dll
9608 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\python\python37.dll
9639 INFO: Caching module hooks...
9639 INFO: Analyzing E:\qt\pyqt\CANdataSender\main.py
9764 INFO: Loading module hooks...
9764 INFO: Loading module hook "hook-encodings.py"...
9936 INFO: Loading module hook "hook-pydoc.py"...
9936 INFO: Loading module hook "hook-PyQt5.py"...
10452 WARNING: Hidden import "sip" not found!
10452 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
11342 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
13624 INFO: Loading module hook "hook-xml.py"...
14139 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
15030 INFO: Looking for ctypes DLLs
15030 INFO: Analyzing run-time hooks ...
15045 INFO: Including run-time hook 'pyi_rth_qt5.py'
15045 INFO: Looking for dynamic libraries
15155 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libEGL.dll
15389 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platformthemes\qxdgdesktopportal.dll
15451 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platformthemes\qxdgdesktopportal.dll
15545 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
15608 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
15670 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
15717 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwebp.dll
15858 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qsvg.dll
15905 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qsvg.dll
15998 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
16061 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
16123 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
16170 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
16233 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qjpeg.dll
17279 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qico.dll
17342 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qico.dll
17420 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtga.dll
17483 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtga.dll
17545 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtga.dll
17608 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
17670 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
17733 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
17795 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
17842 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
17904 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
17967 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
18029 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qminimal.dll
18139 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18201 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18264 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18311 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18373 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18436 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18498 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18561 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwindows.dll
18670 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
18717 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
18779 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
18842 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
18889 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
18951 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
19014 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
19076 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qoffscreen.dll
19170 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwbmp.dll
19217 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qwbmp.dll
19311 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19373 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19436 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19482 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19545 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19607 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19654 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19717 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qtiff.dll
19826 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
19873 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
19967 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
20029 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
20076 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
20139 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
20201 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
20357 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\styles\qwindowsvistastyle.dll
20420 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\styles\qwindowsvistastyle.dll
20592 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qicns.dll
20639 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qicns.dll
20701 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qicns.dll
20826 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\iconengines\qsvgicon.dll
20873 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\iconengines\qsvgicon.dll
20951 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwebgl.dll
21232 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwebgl.dll
21295 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwebgl.dll
21357 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwebgl.dll
21420 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\platforms\qwebgl.dll
21529 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
21576 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
21639 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
21717 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\DLLs\_ssl.pyd
21795 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\_ssl.pyd
21873 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\_ssl.pyd
21935 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\DLLs\pyexpat.pyd
21998 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\python\DLLs\pyexpat.pyd
22060 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\DLLs\pyexpat.pyd
22107 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\pyexpat.pyd
22170 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\pyexpat.pyd
22279 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\DLLs\unicodedata.pyd
22342 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\unicodedata.pyd
22404 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\unicodedata.pyd
22482 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\_hashlib.pyd
22560 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\DLLs\_bz2.pyd
22623 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\_bz2.pyd
22685 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\DLLs\_bz2.pyd
22748 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\DLLs\_bz2.pyd
22795 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\_bz2.pyd
22873 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\DLLs\_lzma.pyd
22935 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\_lzma.pyd
22998 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\_socket.pyd
23060 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\_socket.pyd
23123 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\select.pyd
23185 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtCore.pyd
23248 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtCore.pyd
23310 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtCore.pyd
23373 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtCore.pyd
23451 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\sip.pyd
23513 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\sip.pyd
23560 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\sip.pyd
23623 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\sip.pyd
23685 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtWidgets.pyd
23748 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtWidgets.pyd
23826 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtGui.pyd
23888 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\QtGui.pyd
23982 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\DLLs\_ctypes.pyd
24045 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\_ctypes.pyd
24107 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\_ctypes.pyd
24170 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
24216 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
24279 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
24341 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
24404 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
24451 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
24513 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll
24576 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5dbus.dll
24638 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5dbus.dll
24685 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5dbus.dll
24795 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
24857 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
24920 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
24982 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
25029 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
25091 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
25154 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
25201 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5gui.dll
25295 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25357 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25404 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25466 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25529 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25591 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25638 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25701 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25763 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25826 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5core.dll
25888 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5svg.dll
25951 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5svg.dll
26013 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5svg.dll
26076 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5svg.dll
26169 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26232 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26294 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26341 WARNING: lib not found: api-ms-win-crt-multibyte-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26404 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26466 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26513 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26576 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26638 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26701 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26748 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26810 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of C:\python\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
26888 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5widgets.dll
26951 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5widgets.dll
27013 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5widgets.dll
27076 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5widgets.dll
27185 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5quick.dll
27310 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5quick.dll
27372 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5quick.dll
27435 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5quick.dll
27482 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5quick.dll
27544 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5quick.dll
27607 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5websockets.dll
27669 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5websockets.dll
27779 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5network.dll
27826 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5network.dll
27888 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5network.dll
27951 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5network.dll
28013 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\qt5network.dll
28138 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28201 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28263 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28326 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28372 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28435 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28497 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28544 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28607 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\libcrypto-1_1-x64.dll
28747 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\python\DLLs\libssl-1_1-x64.dll
28810 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\python\DLLs\libssl-1_1-x64.dll
28857 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\DLLs\libssl-1_1-x64.dll
28919 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\DLLs\libssl-1_1-x64.dll
29107 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\Qt5Qml.dll
29154 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\Qt5Qml.dll
29216 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\Qt5Qml.dll
29279 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\Qt5Qml.dll
29341 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\Qt5Qml.dll
29388 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\python\lib\site-packages\PyQt5\Qt\bin\Qt5Qml.dll
29388 INFO: Looking for eggs
29404 INFO: Using Python library c:\python\python37.dll
29404 INFO: Found binding redirects:
[]
29404 INFO: Warnings written to E:\qt\pyqt\CANdataSender\build\main\warn-main.txt
29482 INFO: Graph cross-reference written to E:\qt\pyqt\CANdataSender\build\main\xref-main.html
29529 INFO: checking PYZ
29529 INFO: Building PYZ because PYZ-00.toc is non existent
29529 INFO: Building PYZ (ZlibArchive) E:\qt\pyqt\CANdataSender\build\main\PYZ-00.pyz
30075 INFO: Building PYZ (ZlibArchive) E:\qt\pyqt\CANdataSender\build\main\PYZ-00.pyz completed successfully.
30091 INFO: checking PKG
30091 INFO: Building PKG because PKG-00.toc is non existent
30091 INFO: Building PKG (CArchive) PKG-00.pkg
31888 WARNING: One binary added with two internal names.
31888 WARNING: ('libGLESv2.dll',
 'C:\\python\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
 'BINARY')
31888 WARNING: was placed previously at
31888 WARNING: ('PyQt5\\Qt\\bin\\libGLESv2.dll',
 'C:\\python\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
 'BINARY')
44278 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
44293 INFO: Bootloader c:\python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
44293 INFO: checking EXE
44293 INFO: Building EXE because EXE-00.toc is non existent
44293 INFO: Building EXE from EXE-00.toc
44293 INFO: Appending archive to EXE E:\qt\pyqt\CANdataSender\dist\main.exe
44512 INFO: Building EXE from EXE-00.toc completed successfully.

Package finished, dist folder to find main.exe open the run, and she displayed Failed to execute script main

And then found ControlCAN.dll rely on Microsoft Visual C ++ 2008 Service Pack 1 Redistributable Package MFC Security Update (As you may encounter situations other missing dependencies, you can go here: https://support.microsoft.com/zh -CN / Help / 2,977,003 / The Latest---Visual-C-Supported Downloads )

Then as for those above lib not found: api-ms-win-crt-啥啥啥: warnings related to missing original library file path here to C:\Windows\System32\downlevel
solve this problem:

  1. pyinstaller -p C:\Windows\System32\downlevel xxx(Xxx: You have to pack items)
  2. Or to go directly to the directory, to which all the dll files copied whole

As for the Hidden import "sip" not found!warning, the envelope looks futile, can be masked by the following method:
pyinstaller -p C:\Windows\System32\downlevel -Fw main.py --hidden-import=PyQt5.sip

Guess you like

Origin blog.csdn.net/weixin_34223655/article/details/90957931
Recommended