nuitka 打包报错,错误日志为:
PS C:\Users\Administrator\Desktop\FontProject> nuitka --onefile .\pdftopng.py
Nuitka-Options:INFO: Used command line options: --onefile .\pdftopng.py
Nuitka:INFO: Starting Python compilation with Nuitka '1.9.5' on Python '3.10' commercial grade 'not installed'.
Nuitka-Plugins:WARNING: Use '--enable-plugin=tk-inter' for: Tkinter needs TCL included.
Nuitka-Plugins:INFO: anti-bloat: Not including 'PIL.ImageQt' automatically in order to avoid bloat, but this may cause: PIL will not be able to create Qt image objects.
Nuitka:INFO: Completed Python level compilation and optimization.
Nuitka:INFO: Generating source code for C backend compiler.
Nuitka:INFO: Running data composer tool for optimal constant value handling.
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: gcc (gcc 13.2.0).
Nuitka-Scons:INFO: Backend linking program with 380 files (no progress information available for this stage).
Nuitka-Scons:INFO: Compiled 379 C files using ccache.
Nuitka-Scons:INFO: Cached C files (using ccache) with result 'cache hit': 379
Nuitka-Plugins:INFO: dll-files: Found 1 file DLLs from numpy installation.
Nuitka-Reports:INFO: Compilation report written to file 'nuitka-crash-report.xml'.
Detecting used DLLs: 2.6%|▋ | 1/39, pdftopng.exeTraceback (most recent call last):
File "D:\Program Files\Python310\lib\site-packages\nuitka\__main__.py", line 170, in <module>
main()
File "D:\Program Files\Python310\lib\site-packages\nuitka\__main__.py", line 156, in main
MainControl.main()
File "D:\Program Files\Python310\lib\site-packages\nuitka\MainControl.py", line 1116, in main
_main()
File "D:\Program Files\Python310\lib\site-packages\nuitka\MainControl.py", line 1008, in _main
detectUsedDLLs(
File "D:\Program Files\Python310\lib\site-packages\nuitka\freezer\Standalone.py", line 335, in detectUsedDLLs
_detectUsedDLLs(
File "D:\Program Files\Python310\lib\site-packages\nuitka\freezer\Standalone.py", line 253, in _detectUsedDLLs
used_dlls = _detectBinaryDLLs(
File "D:\Program Files\Python310\lib\site-packages\nuitka\freezer\Standalone.py", line 142, in _detectBinaryDLLs
return detectBinaryPathDLLsWin32(
File "D:\Program Files\Python310\lib\site-packages\nuitka\freezer\DllDependenciesWin32.py", line 97, in detectBinaryPathDLLsWin32
result = detectDLLsWithDependencyWalker(
File "D:\Program Files\Python310\lib\site-packages\nuitka\freezer\DependsExe.py", line 234, in detectDLLsWithDependencyWalker
result = parseDependsExeOutput(output_filename)
File "D:\Program Files\Python310\lib\site-packages\nuitka\freezer\DependsExe.py", line 175, in parseDependsExeOutput
return _parseDependsExeOutput2(getFileContentByLine(filename, encoding="latin1"))
File "D:\Program Files\Python310\lib\site-packages\nuitka\freezer\DependsExe.py", line 149, in _parseDependsExeOutput2
dll_filename = getWindowsLongPathName(dll_filename)
File "D:\Program Files\Python310\lib\site-packages\nuitka\utils\FileOperations.py", line 1149, in getWindowsLongPathName
raiseWindowsError("getWindowsLongPathName for %s" % filename)
File "D:\Program Files\Python310\lib\site-packages\nuitka\utils\Utils.py", line 406, in raiseWindowsError
raise WindowsError(
OSError: [Errno 123] getWindowsLongPathName for d:\progra~1\tencent\we~1\dll\msvcrt.dll (文件名、目录名或卷标语法不正确。)
Nuitka-Reports:INFO: Compilation crash report written to file 'nuitka-crash-report.xml'. Please include it in your bug report.
Detecting used DLLs: 2.6%|▋ | 1/39, pdftopng.exe
卸载nuitka 重新安装 更换了gcc 这些都不管用。
原因是安装了微信开发工具,环境冲突,把这个环境变量改个名字,或者删除即可。
使用:nuitka --standalone --windows-disable-console --plugin-enable=tk-inter --plugin-enable=numpy --windows-icon-from-ico=suguang.ico .\pdftopng.py
成功了
完美源码 » nuitka 打包报错OSError: [Errno 123] getWindowsLongPathName for d:\progra~1\tencent\we~1\dll\msvcrt.dll (文件名、目录名或卷标语法不正确。)