[Fixed]-OSError: dlopen(libSystem.dylib, 6): image not found

15👍

I suspect (but can’t confirm) the System Integrity Protection (SIP) of OSX El Capitan is preventing access to your /usr/lib folder.

It would be extreme and defeating the purpose of the security feature, but you could try disabling SIP by booting into the OS X Recovery partition, executing csrutil disable and rebooting…atleast until another option / work-around can be found.

ArsTechnica has a write-up here: http://arstechnica.com/apple/2015/09/os-x-10-11-el-capitan-the-ars-technica-review/9/

And a similar issue is described here: http://blog.honekamp.net/blog/2015/09/07/el-cap-and-my-printer/

More discussion on Hacker News here: https://news.ycombinator.com/item?id=10309576

11👍

pip install --upgrade billiard
pip install --upgrade celery
pip install --upgrade kombu
pip install --upgrade amqp

This should work.

3👍

I uninstall “billiard,celery,kombu,amqp” those four packages. Then reinstall the latest version from github solved this

3👍

I also ran into the same problem just after upgrading the OS to OS X El Captain. Disabling SIP does the trick, but if someone is not comfortable doing that updating five.py in few modules in site-packages will help. (I know it’s not that nice, but it’s OK as long as you know what you’re doing)

Update the places that access the DLL to have absolute path in following modules

line 145 of site-packages/amqp/five.py 
line 52 of site-packages/kombu/five.py 
line 42 of site-packages/billiard/five.py 

update to:

libSystem = ctypes.CDLL('libSystem.dylib') => libSystem = ctypes.CDLL('/usr/lib/libSystem.dylib')

hope this helps 😉

👤njs

2👍

I ran into the same issue getting celery to work.

I did some quick tests and here’s what I found, but can’t quite pin it on a specific cause yet:

a. stock python with ctypes.CDLL(“libSystem.dylib”) results in the image not found error.

b. stock python with ctypes.CDLL(“/usr/lib/libSystem.dylib”) works

c. virtualenv python with ctypes.CDLL(“libSystem.dylib”) works

0👍

Reinstalling python solved the issue for me. Using brew you can just brew install python again. If it says that you need permission to write to /usr/local, try to change permissions by sudo chown -R $(whoami):admin /usr/local, and then install python.

0👍

I tried updating to the latest versions of these libraries from github, but it did not help. The simplest solution that I’ve found is to use virtualenv

virtualenv myenv
cd myenv
source bin/activate
pip install celery

To confirm it worked:

python -c "import celery"

This seems preferable to disabling a fundamental security feature of the OS, and virtualenv has its own (well documented) benefits.

0👍

You can delete the current celery version, and then download it from the http://pypi.python.org/pypi/celery/, build and install the sorce code.It is helpful for me, and I hope so do you.

👤dyljqq

0👍

In my case, the error is because Homebrew was not symlink to gettext properly. I’ve solved this using

brew unlink gettext && brew link --force gettext

0👍

copying from How to install h5py (needed for Keras) on MacOS with M1?

in case someone ended up here first like I was and wants to avoid disabling SIP. this seems to work for me:

brew install hdf5@1.10  
export HDF5_DIR=/usr/local/Cellar/hdf5@1.10/1.10.7_1
pip install 'h5py==2.10.0' --force-reinstall --no-binary=h5py

-1👍

1 . Install Homebrew as macOS Sur is missing the necessary ODBC package

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2 . Install missing ODBC package

brew install libiodbc

Leave a comment