Error when building standalone with Nuitka-Python
See original GitHub issue-
How did you install Nuitka and Python
Did you use pip, anaconda, deb, rpm, from source, git clone, then install into a virtualenv or not, this is very important usually.
Run from source using Nuitka Python.
-
Provide in your issue the Nuitka options used
Ideally use the project feature, so options and example code go alone
test.py: print("Hello World")
-m nuitka --standalone test.py
Error:
Traceback (most recent call last):
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\__main__.py", line 137, in <module>
main()
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\__main__.py", line 123, in main
MainControl.main()
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\MainControl.py", line 929, in main
result, options = compileTree()
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\MainControl.py", line 852, in compileTree
result, options = runSconsBackend(quiet=not Options.isShowScons())
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\MainControl.py", line 690, in runSconsBackend
SconsInterface.runScons(
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\build\SconsInterface.py", line 249, in runScons
options["result_name"] = getExternalUsePath(
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\utils\FileOperations.py", line 759, in getExternalUsePath
dirname = getWindowsShortPathName(os.path.dirname(filename))
File "C:\Nuitka-Python\output\lib\site-packages\nuitka\utils\FileOperations.py", line 728, in getWindowsShortPathName
raise WindowsError(
FileNotFoundError: [Errno 2] The system cannot find the file specified.
git bisect led me to the following commit:
053c207229292b7f011937964a69cdf271d47532 is the first bad commit
commit 053c207229292b7f011937964a69cdf271d47532
Author: Kay Hayen <kay.hayen@gmail.com>
Date: Mon Feb 7 09:57:30 2022 +0100
macOS: Added support for mixing --onefile and --macos-create-app-bundle
* For some software, e.g. PySide2 it will actually be the only way
to get it working.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Nuitka compilation error when building on windows
I have a python project I'd like to package up as a standalone executable. I have tried PyInstaller but with little luck. So...
Read more >Ubuntu Manpage: nuitka - the Python compiler
--standalone, --portable Enable standalone mode in build. ... Executing all self checks possible to find errors in Nuitka, do not use for production....
Read more >Nuitka · PyPI
Nuitka translates the Python modules into a C level program that then uses ... To distribute, build with --standalone option, which will not...
Read more >Nuitka: Compiling Python for redistribution - YouTube
Python has no native mechanism for bundling apps for redistribution, so various third-party projects have filled the gap. The Nuitka project ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am adding a
resetDirectory
that first removes a directory and then creates it again, for use in these cases, that should solve the issue.Part of 0.8 release that I just made.