"hello world" on macOS Mojave and miniconda - dyld: Library not loaded
See original GitHub issueHello all, first try with miniconda installation of Nuitka, with a simple hello-world script on macOS Mojave. Here the key info:
- Python and Nuitka version:
nuitka: 0.6.5
Python: 3.7.4 (default, Aug 13 2019, 15:17:50)
OS: Darwin
Arch: x86_64
-
Tested both with Python3 and Nuitka installed from conda-forge and with Python3 from miniconda main and Nuitka installed from PyPI.
-
Compiled with:
python -m nuitka hello.py
tried also with--standalone
-
hello.py source from Nuitka documentation:
def talk(message):
return "Talk " + message
def main():
print(talk("Hello World"))
if __name__ == "__main__":
main()
-
No error at compile time (also checked with
--verbose
and--show-scons
) -
Always get the following error at runtime:
dyld: Library not loaded: @rpath/libpython3.7m.dylib
Referenced from: /Users/gioboske/dev/nuitka/hello.dist/./hello
Reason: image not found
Abort trap: 6
Am I missing something obvious? Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
macos - dyld: Library not loaded ... Reason: Image not found
I have installed the boost libraries and they are located in /opt/local/lib . I think the problem has something to do with the...
Read more >Clang linking error MacOS Big Sur | Apple Developer Forums
I believe it is this: in Big Sur system dynamic link libraries are not available as separate entities. They're pre-loaded. The -l switch...
Read more >macOS for deep learning with Python, TensorFlow, and Keras
Inside this tutorial you'll learn how to configure your macOS machine for deep learning using Python, Keras, and TensorFlow.
Read more >cannot load 'libomp.dylib' | The Search Engine You Control
Bug I tried to install PyTorch, but I can't use it. It can't link dynamic library libomp.dylib To Reproduce Steps to reproduce the...
Read more >Dyld_ library not loaded_ @rpath - miocittadino.it
Nov 15, 2016 · Hi ALangHung, Sorry for the delayed response. dylib - fontforge ... Apr 27, 2020 · How to Fix 'Dyld:...
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
Finally, I found some time to debug, following your suggestion to look into the code in
nuitka.freezer.Standalone
forotool
output.As far as I understood, nuitka finds no “rpaths” (in
_detectBinaryRPathsMacOS
): while processing the output ofotool -l
on the executable, only thecmd LC_RPATH
load commands are considered. Unfortunately, nocmd LC_RPATH
are present in the output ofotoll -l
and@rpath/libpython3.7m.dylib
only appears as follows:I think this explains why the library is not copied in the dist folder.
, but I didn’t get why the error persists also when compiling without theIn addition, since the library is not included in--standalone
option, manual copying the library next tohello.bin
.dll_map
variable, theinstall_name_tool
is not called, so the error persists also manual copying the library next to executable.@kayhayen, do you have some additional suggestions?
@mysakbm posting below existing issues is a surefire way to get ignored