“ OSError:dlopen(libSystem.dylib,6):找不到映像”(OS X + macports + Celery 3.1.7)


问题内容

我刚刚通过点(1.5)将芹菜更新为最新版本(3.1.7),但是我遇到一个致命异常,当我尝试导入该库时我不明白。通过运行:

from celery import Celery 在外壳中,我得到:

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

我在OS X 10.8.5上将python 2.7.6与VirtualEnv和macports一起使用

我知道问题在于缺少基本的依赖项(“ libSystem.dylib”),但我不知道如何解决此问题

(在/ usr / lib /下,我可以在我的机器上找到libSystem.dylib)


问题答案:

问题是我DYLD_FALLBACK_LIBRARY_PATH.bash_profile中 定义了a
,实际上是按照Postgis上Django文档中有关macports的说明进行了操作:https
://docs.djangoproject.com/en/1.6/ref/contrib/gis/install/#macports

但这会导致意外的行为,就像我面对的那样,无论如何将其注释掉,似乎都可以正常工作!