question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library not loaded: '@rpath/libpython3.10.dylib'

See original GitHub issue

I installed miniconda via homebrew and then created a virtual environment. I installed it via pip nuitka and orderset and tried to build the hello test file from the example on the website. I used nuitka bevor on windows, were I had no problem. I am running it now on an M1 Pro Macbook. I´ve tried the stable release and the development version.

python -m nuitka --standalone hello.py (tester)

Building it works fine without errors.

Nuitka-Options:INFO: Used command line options: --standalone hello.py
Nuitka:INFO: Starting Python compilation with Nuitka '1.1rc8' on Python '3.10' commercial grade 'not installed'.
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: clang (clang).
Nuitka-Scons:INFO: Backend linking program with 10 files (no progress information available).
Nuitka-Scons:WARNING: You are not using ccache.
Nuitka:INFO: Keeping build directory 'hello.build'.                             
Nuitka:INFO: Created binary that runs on macOS 11.1 (arm64) or higher.
Nuitka:INFO: Successfully created 'hello.dist/hello'

Running then the output file results in this error. The file libpython3.10.dylib which cannot be found is in the directory. Building it in normal mode (not onefile or standalone) works just fine.

hello.dist/hello

dyld[10503]: Library not loaded: '@rpath/libpython3.10.dylib'
  Referenced from: '/Users/alex/dev/env-tester/hello.dist/hello'
  Reason: tried: '$ORIGIN/libpython3.10.dylib' (no such file), '$ORIGIN/libpython3.10.dylib' (no such file), '/usr/local/lib/libpython3.10.dylib' (no such file), '/usr/lib/libpython3.10.dylib' (no such file)
fish: Job 1, './hello' terminated by signal SIGABRT (Abort)

python -m nuitka --version

1.1rc8
Commercial: None
Python: 3.10.4 (main, Mar 31 2022, 03:37:37) [Clang 12.0.0 ]
Flavor: Anaconda Python
Executable: /opt/homebrew/Caskroom/miniconda/base/envs/tester/bin/python
OS: Darwin
Arch: arm64

pip list

Package     Version
----------- ---------
certifi     2022.6.15
Nuitka      1.1rc8
ordered-set 4.1.0
pip         22.1.2
setuptools  63.4.1
wheel       0.37.1

Thanks a lot for the help.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Aug 30, 2022

I have seen this myself recently, and fixed it on factory, however, at least for numpy, I was still having errors, that I am looking at right now, relatated to MKL libs missing. I believe the 3.10 build from conda force might be somehow causing this, or maybe I am just confused, previous versions definitely worked.

https://nuitka.net/doc/factory.html

0reactions
kayhayencommented, Sep 25, 2022

This is part of the stable release 1.1 that I just made.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cython Library not loaded: @rpath/libpython3.8.dylib
I was able to successfully compile and run the executable using a non-conda python environment of python 3.7, so that leads me to...
Read more >
Anaconda3 Install on Big Sur - KLayout
I am using Python 3.8.10 on Big Sur 11.4. ... "Termination Reason: DYLD, [0x1] Library missing ... Library not loaded: @rpath/libpython3.8.dylib
Read more >
Library not loaded: @rpath/libcudart.10.2.dylib - MathWorks
I've recently been getting the following error when trying to run "bwlabel.m". Trying to run code that had been working as recently as...
Read more >
Dreaded "dyld: Library not loaded:… | Apple Developer Forums
I get this when I try to run a project on the Xcode 8.0 beta 3 (8S174q) Simulator: dyld: Library not loaded: @rpath/libswiftCore.dylib...
Read more >
Jep intialization failed in Mac OSX - Google Groups
setJepLibraryPath("/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/jep/ ... 1): Library not loaded: @rpath/libpython3.7m.dylib.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found