Nuitka打包报错

前言

使用Nuitka打包python项目时发生报错

报错

Nuitka-Plugins:INFO: pyqt5: Found 2 files DLLs from ‘OpenSSL’ PyQt5 installation.
Nuitka-Inclusion:INFO: Analyzing dependencies of ‘app.dist\app.exe’.
Detecting used DLLs: 2.6%|▋ | 1/39, app.exeTraceback (most recent call last):
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka_main_.py”, line 155, in
main()
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka_main_.py”, line 141, in main
MainControl.main()
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\MainControl.py”, line 1109, in main
_main()
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\MainControl.py”, line 1012, in _main
detectUsedDLLs(
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\Standalone.py”, line 766, in detectUsedDLLs
_detectUsedDLLs(
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\Standalone.py”, line 688, in _detectUsedDLLs
used_dlls = _detectBinaryDLLs(
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\Standalone.py”, line 593, in _detectBinaryDLLs
return detectBinaryPathDLLsWindowsDependencyWalker(
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DllDependenciesWin32.py”, line 97, in detectBinaryPathDLLsWindowsDependencyWalker
result = detectDLLsWithDependencyWalker(
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DependsExe.py”, line 221, in detectDLLsWithDependencyWalker
result = parseDependsExeOutput(output_filename)
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DependsExe.py”, line 162, in parseDependsExeOutput
return _parseDependsExeOutput2(getFileContentByLine(filename, encoding=“latin1”))
File “C:\Users\yuai.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DependsExe.py”, line 154, in _parseDependsExeOutput2
assert os.path.isfile(dll_filename), (dll_filename, line)
AssertionError: (‘d:\\x04\x0\x04\x04\x04\\x04\x04\x04\x04\t4\x04\x04\x04\x04\jvms_v~1.5_a\store\jdk11\bin\api-ms-win-crt-runtime-l1-1-0.dll’, ’ [ ^6] d:\\x04\x04\x04\tools\\x04\x04\x04\x4\x04\x04\jvms_v~1.5_a\store\jdk11\bin\API-MS-WIN-CRT-RUNTIME-L1-1-0.DLL’)

Nuitka-Plugins:INFO: pyqt5: Found 2 files DLLs from 'OpenSSL' PyQt5 installation.
Nuitka-Inclusion:INFO: Analyzing dependencies of 'app.dist\app.exe'.
Detecting used DLLs: 2.6%|| 1/39, app.exeTraceback (most recent call last):
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\__main__.py", line 155, in <module>
    main()
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\__main__.py", line 141, in main
    MainControl.main()
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\MainControl.py", line 1109, in main
    _main()
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\MainControl.py", line 1012, in _main
    detectUsedDLLs(
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\Standalone.py", line 766, in detectUsedDLLs
    _detectUsedDLLs(
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\Standalone.py", line 688, in _detectUsedDLLs
    used_dlls = _detectBinaryDLLs(
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\Standalone.py", line 593, in _detectBinaryDLLs
    return detectBinaryPathDLLsWindowsDependencyWalker(
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DllDependenciesWin32.py", line 97, in detectBinaryPathDLLsWindowsDependencyWalker
    result = detectDLLsWithDependencyWalker(
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DependsExe.py", line 221, in detectDLLsWithDependencyWalker
    result = parseDependsExeOutput(output_filename)
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DependsExe.py", line 162, in parseDependsExeOutput
    return _parseDependsExeOutput2(getFileContentByLine(filename, encoding="latin1"))
  File "C:\Users\yuai\.pyenv\pyenv-win\versions\3.9.4\lib\site-packages\nuitka\freezer\DependsExe.py", line 154, in _parseDependsExeOutput2
    assert os.path.isfile(dll_filename), (dll_filename, line)
AssertionError: ('d:\\\x04\\\x04\x04\x04\x04\\tools\\\x04\x\x04\x04\x04\\jvms_v~1.5_a\\store\\jdk11\\bin\\api-ms-win-crt-runtime-l1-1-0.dll', '               [ ^6] d:\\\x04\x04\x04\x04\x04\x04\x04\x04\\\x04\x04\x04\x04\\tools\\\x04\x04\x04\x04\x04\x04\x04\x04\\jvms_v~1.5_a\\store\\jdk11\\bin\\API-MS-WIN-CRT-RUNTIME-L1-1-0.DLL')

解决方法

发生这种错误的原因是我的Java.exe即我Java环境的路径有特殊字符,如中文。。。。解决方法其实也就是将Java换成纯英文一类的不带特殊字符的路径即可。
比如我这里换成了

D:\Java\jvms_v2.1.5_amd64

Nuitka打包报错_第1张图片
之前用习惯了自己搭建的武器库,导致武器库的路径有大量的中文,只不过我没太想到的是这玩意调用Java的频率不低。没办法只能给Java换路径,导致我重构了武器库,裂开

你可能感兴趣的:(python问题集,python,开发语言,github,java)