Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"OSError: dlopen(libSystem.dylib, 6): image not found" (OS X + macports + Celery 3.1.7)

I just updated celery via pip (1.5) to the latest version (3.1.7), but I get a fatal exception which I don't understand as soon I try to import the library. By running:

from celery import Celery in the shell I get:

File "<console>", line 1, in <module>
  File "/Users/davidezanotti/CygoraPythonEnv/lib/python2.7/site-packages/celery/__init__.py", line 130, in <module>
    from .five import recreate_module
  File "/Users/davidezanotti/CygoraPythonEnv/lib/python2.7/site-packages/celery/five.py", line 51, in <module>
    from kombu.five import monotonic
  File "/Users/davidezanotti/CygoraPythonEnv/lib/python2.7/site-packages/kombu/five.py", line 47, in <module>
    libSystem = ctypes.CDLL('libSystem.dylib')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libSystem.dylib, 6): image not found

I'm using python 2.7.6 with VirtualEnv and macports on OS X 10.8.5

I understand that the problem is that an underlying dependency ("libSystem.dylib") is missing, but I don't know how to fix this issue

(under /usr/lib/ I can find libSystem.dylib on my machine)

like image 893
daveoncode Avatar asked Jan 04 '14 01:01

daveoncode


1 Answers

Just add /usr/lib to DYLD_FALLBACK_LIBRARY_PATH will resolve this issue.

like image 159
Ryan X Avatar answered Sep 22 '22 10:09

Ryan X