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/libz.1.dylib

See original GitHub issue

I am getting this error


OSError: dlopen(/Library/Python/2.7/site-packages/llvmlite/binding/libllvmlite.dylib, 6): Library not loaded: @rpath/libz.1.dylib
  Referenced from: /Library/Python/2.7/site-packages/llvmlite/binding/libllvmlite.dylib
  Reason: image not found

python path /usr/bin/python

pip path /usr/local/bin/pip

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:24 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
zuzanacommented, Jan 11, 2018

Hi,

the 2 commands helped, however I had to do two more (maybe my specific usecase, not sure since I’m new into this):

sudo install_name_tool -change "@rpath/libc++.1.dylib" "/usr/lib/libc++.1.dylib" /Library/Python/2.7/site-packages/numba/typeconv/_typeconv.so
sudo install_name_tool -change "@rpath/libc++.1.dylib" "/usr/lib/libc++.1.dylib" /Library/Python/2.7/site-packages/numba/_dispatcher.so

Thanks a lot for all your help!

3reactions
seibertcommented, Jan 10, 2018

OK, after trying a bunch of things and being shot down by System Integrity Protection, this is the best workaround we can come up with.

Assuming you are seeing the library open error for the exact path /Library/Python/2.7/site-packages/llvmlite/binding/libllvmlite.dylib, you should do the following:

sudo install_name_tool -change "@rpath/libz.1.dylib" "/usr/lib/libz.1.dylib" /Library/Python/2.7/site-packages/llvmlite/binding/libllvmlite.dylib
sudo install_name_tool -change "@rpath/libc++.1.dylib" "/usr/lib/libc++.1.dylib" /Library/Python/2.7/site-packages/llvmlite/binding/libllvmlite.dylib

Note that this fix will need to be repeated if you reinstall llvmlite, and this should not be needed for any Python other than the Python shipped by macOS.

Moving forward, we’re going to see if we can get this fix applied automatically when we build the wheel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

installation - MacOS - Library not loaded: @rpath/libz.1.dylib
I am trying desperately to install package png into R on MacOS Big Sur 11.3 . Unfortunately, I have issue with libz.1.dylib :...
Read more >
RDKit Library not loaded: @rpath/libz.1.dylib - KNIME Forum
Loading of RDKit nodes fails with below error. Any idea whats going wrong? ... RDKit Library not loaded: @rpath/libz.1.dylib.
Read more >
[Numba] Issue Library not loaded: @rpath/libz.1.dylib
Hello, I want to use the librosa module, where the llvmlite module is required. Whenever I run a Python script importing librosa, I...
Read more >
dyld: Library not loaded: @rpath/libswiftCore.dylib
I'm using using Xcode 7.0.1 and IOS 9.0.2 app works fine on simulator but it fails when I try to run it on...
Read more >
numba/numba-dev - Gitter
import zlib works but the linkage for libz from libllvmlite.dylib doesn't, which suggests that it may not actually be that the library cannot...
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