Question

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)

Was it helpful?

Solution 2

The problem was that I had defined a DYLD_FALLBACK_LIBRARY_PATH in my .bash_profile, by following literally the notes about macports in Django documentation on postgis: https://docs.djangoproject.com/en/1.6/ref/contrib/gis/install/#macports

but this leads to unexpected behavior like the one I faced, anyway by commenting it out, all seems to work!

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top