上次,我用nuitka打包一个项目,却出现了十分奇怪的报错,有哪位大神可以帮忙解决一下,谢谢!!!
我的打包命令:nuitka --standalone --windows-disable-console --plugin-enable=tk-inter --windows-icon-from-ico="image/ico.ico" --windows-file-version=1.0.0 test.py
报错:
Detecting used DLLs: 38.0%|█████████▌ | 19/50, pygame_freetype.pydTraceback (most recent call last):
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka_main_.py", line 151, in <module>
main()
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka_main_.py", line 137, in main
MainControl.main()
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\MainControl.py", line 958, in main
detectUsedDLLs(
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\freezer\Standalone.py", line 722, in detectUsedDLLs
_detectUsedDLLs(
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\freezer\Standalone.py", line 683, in _detectUsedDLLs
used_dlls = _detectBinaryDLLs(
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\freezer\Standalone.py", line 584, in _detectBinaryDLLs
return detectBinaryPathDLLsWindowsDependencyWalker(
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\freezer\DllDependenciesWin32.py", line 93, in detectBinaryPathDLLsWindowsDependencyWalker
result = detectDLLsWithDependencyWalker(
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\freezer\DependsExe.py", line 195, in detectDLLsWithDependencyWalker
result = parseDependsExeOutput(output_filename)
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\freezer\DependsExe.py", line 137, in parseDependsExeOutput
return _parseDependsExeOutput2(getFileContentByLine(filename, encoding="latin1"))
File "C:\Users\王先生.virtualenvs\project-Vbf8eoYI\lib\site-packages\nuitka\freezer\DependsExe.py", line 129, in _parseDependsExeOutput2
assert os.path.isfile(dll_filename), (dll_filename, line)
AssertionError: ('c:\users\\x04\x04\x04\x04\x04\x04\virtua1\projec1\lib\site-p~1\pygame\sdl2.dll', ' [ 6] c:\users\\x04\x04\x04\x04\x04\x04\virtua1\projec1\lib\site-p~1\pygame\SDL2.DLL')
重装了python、库也没用
参考https://zhuanlan.zhihu.com/p/165618241