Search code examples
pythoncompiler-errorsnuitka

How can I fix the fatal error C1060 that occurs when using Nuitka to compile .py to .exe?


At the end of compiling the .py file in .exe error C1060 occurs, how to solve this problem?

Nuitka command:

nuitka --onefile --jobs=4 --disable-ccache --plugin-enable=pyqt5 --windows-icon-from-ico=youtube-downloader-icon.ico downloader.py

Full terminal output:

E:\code\PycharmProjects\pythonProject\YOUTUBE_DOWNLOADER_2>nuitka --onefile --jobs=4 --disable-ccache --plugin-enable=pyqt5 --windows-icon-from-ico=youtube-downloader-icon.ico downloader.py
Nuitka-Options:INFO: Used command line options: --onefile --jobs=4 --disable-ccache --plugin-enable=pyqt5 --windows-icon-from-ico=youtube-downloader-icon.ico downloader.py
Nuitka:WARNING: The Python version '3.11' is only experimentally supported by Nuitka '1.5.4', but an upcoming release
Nuitka:WARNING: will change that. In the mean time use Python version '3.10' instead or newer Nuitka.
Nuitka-Plugins:WARNING: pyqt5: For the obsolete PyQt5 the Nuitka support is incomplete. Threading, callbacks to compiled
Nuitka-Plugins:WARNING: functions, etc. may not be working.
Nuitka-Plugins:WARNING:     Complex topic! More information can be found at https://nuitka.net/info/pyqt5.html
Nuitka:INFO: Starting Python compilation with Nuitka '1.5.4' on Python '3.11' commercial grade 'not installed'.
Nuitka-Plugins:INFO: pyqt5: Injecting pre-module load code for module 'PyQt5':
Nuitka-Plugins:INFO: pyqt5:     Adding binary folder to runtime 'PATH' environment variable for proper Qt loading.
Nuitka-Plugins:INFO: pyqt5: Injecting post-module load code for module 'PyQt5.QtCore':
Nuitka-Plugins:INFO: pyqt5:     Setting Qt library path to distribution folder. We need to avoid loading target
Nuitka-Plugins:INFO: pyqt5:     system Qt plugins, which may be from another Qt version.
Nuitka-Plugins:INFO: multiprocessing: Injecting pre-module load code for module 'multiprocessing':
Nuitka-Plugins:INFO: multiprocessing:     Monkey patching "multiprocessing" load environment.
Nuitka-Plugins:INFO: multiprocessing: Injecting post-module load code for module 'multiprocessing':
Nuitka-Plugins:INFO: multiprocessing:     Monkey patching "multiprocessing" for compiled methods.
Nuitka-Plugins:INFO: pkg-resources: Injecting post-module load code for module 'pkg_resources':
Nuitka-Plugins:INFO: pkg-resources:     Registering Nuitka loader with "pkg_resources".
Nuitka-Plugins:INFO: options-nanny: Note, when using 'PyQt5', consider using '--disable-console' option. Otherwise a terminal window will open. However for debugging, terminal output is the easiest way to see informative traceback information.
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: cl (cl 14.3).
Nuitka-Scons:INFO: Slow C compilation detected, used 60s so far, scalability problem.
Unexpected output from this command:
Unexpected output from this command:
cl /Fomodule.yt_dlp.extractor.youtube.obj /c "module.yt_dlp.extractor.youtube.cpp" /TP /nologo /Ox /GF /Gy /EHsc /J /Gd /bigobj /MT /D__NUITKA_NO_ASSERT__ /D_NUITKA_STANDALONE /D_NUITKA_ONEFILE_MODE /D_NUITKA_ONEFILE_TEMP_BOOL /D_NUITKA_CONSTANTS_FROM_RESOURCE /D_NUITKA_FROZEN=155 /D_NUITKA_EXE /D_NUITKA_PLUGIN_MULTIPROCESSING_ENABLED=1 /IE:\code\Python\include /I. /IE:\code\Python\Lib\site-packages\nuitka\build\include /IE:\code\Python\Lib\site-packages\nuitka\build\static_src
cl /Fomodule.yt_dlp.extractor.zattoo.obj /c "module.yt_dlp.extractor.zattoo.cpp" /TP /nologo /Ox /GF /Gy /EHsc /J /Gd /bigobj /MT /D__NUITKA_NO_ASSERT__ /D_NUITKA_STANDALONE /D_NUITKA_ONEFILE_MODE /D_NUITKA_ONEFILE_TEMP_BOOL /D_NUITKA_CONSTANTS_FROM_RESOURCE /D_NUITKA_FROZEN=155 /D_NUITKA_EXE /D_NUITKA_PLUGIN_MULTIPROCESSING_ENABLED=1 /IE:\code\Python\include /I. /IE:\code\Python\Lib\site-packages\nuitka\build\include /IE:\code\Python\Lib\site-packages\nuitka\build\static_src
module.yt_dlp.extractor.youtube.cpp(127845): fatal error C1060: Є®¬ЇЁ«пв®аг ­Ґ еў в Ґв а §¬Ґа  ЄгзЁ
scons: *** [module.yt_dlp.extractor.youtube.obj] Error 2
module.yt_dlp.extractor.zattoo.cpp(46870): fatal error C1060: Є®¬ЇЁ«пв®аг ­Ґ еў в Ґв а §¬Ґа  ЄгзЁ
Backend C: 97.6%|████████████████████████▍| 1197/1227scons: *** [module.yt_dlp.extractor.zattoo.obj] Error 2
Nuitka-Scons:INFO: Running 'cl /Fomodule.yt_dlp.extractor.lazy_extractors.obj /c "module.yt_dlp.extractor.lazy_extractors.cpp" /TP /nologo /Ox /GF /Gy /EHsc /J /Gd /bigobj /MT /D__NUITKA_NO_ASSERT__ /D_NUITKA_STANDALONE /D_NUITKA_ONEFILE_MODE /D_NUITKA_ONEFILE_TEMP_BOOL /D_NUITKA_CONSTANTS_FROM_RESOURCE /D_NUITKA_FROZEN=155 /D_NUITKA_EXE /D_NUITKA_PLUGIN_MULTIPROCESSING_ENABLED=1 /IE:\\code\\Python\\include /I. /IE:\\code\\Python\\Lib\\site-packages\\nuitka\\build\\include /IE:\\code\\Python\\Lib\\site-packages\\nuitka\\build\\static_src' took 262.56 seconds
Unexpected output from this command:
cl /Fomodule.yt_dlp.extractor.lazy_extractors.obj /c "module.yt_dlp.extractor.lazy_extractors.cpp" /TP /nologo /Ox /GF /Gy /EHsc /J /Gd /bigobj /MT /D__NUITKA_NO_ASSERT__ /D_NUITKA_STANDALONE /D_NUITKA_ONEFILE_MODE /D_NUITKA_ONEFILE_TEMP_BOOL /D_NUITKA_CONSTANTS_FROM_RESOURCE /D_NUITKA_FROZEN=155 /D_NUITKA_EXE /D_NUITKA_PLUGIN_MULTIPROCESSING_ENABLED=1 /IE:\code\Python\include /I. /IE:\code\Python\Lib\site-packages\nuitka\build\include /IE:\code\Python\Lib\site-packages\nuitka\build\static_src
module.yt_dlp.extractor.lazy_extractors.cpp(469234): fatal error C1060: Є®¬ЇЁ«пв®аг ­Ґ еў в Ґв а §¬Ґа  ЄгзЁ
Backend C: 97.7%|████████████████████████▍| 1199/1227scons: *** [module.yt_dlp.extractor.lazy_extractors.obj] Error 2

Solution

  • hello i think this will help try python 3.10.1 and reinstall nuitka and try this commend :

    python -m nuitka --onefile --include-package=PyQt5 --include-package-data=PyQt5 --follow-imports --enable-plugin=pyqt5 --include-qt-plugins=all main.py