Nuitka: macOS: Official CPython packages give "code signature invalid"
- MacOS Catalina (10.15)
- Nuitka v0.6.8.4
- Python v3.8.3
- Nuitka installed from pip
- Python installed from official package on python.org
For some reason no Nuitka compiled package works on my MacOS. I’ve just tested with a print("Hello World") compiled with python -m nuitka --standalone test.py and the result is always this:
dyld: Library not loaded: @executable_path/Python
Referenced from: /test.dist/./main
Reason: no suitable image found. Did find:
/test.dist/./Python: code signature invalid for '/test.dist/./Python'
/test.dist/./Python: stat() failed with errno=1
/test.dist/Python: code signature invalid for '/test.dist/Python'
/test.dist/Python: stat() failed with errno=1
zsh: abort ./test
I found issue #672 that is similar but the proposed solution of using a venv doesn’t change anything for me.
The output for otool -L:
/bin/python:
/Library/Frameworks/Python.framework/Versions/3.8/Python (compatibility version 3.8.0, current version 3.8.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 28 (19 by maintainers)
Fixed, see #789 it seems the code signature must be removed or else it will not be possible to load the DLL.