dav*_*ode 6 python macos macports virtualenv
我刚刚通过pip(1.5)将celery更新到最新版本(3.1.7),但是我得到了一个致命的异常,我很快就会尝试导入该库.通过运行:
from celery import Celery 在shell中我得到:
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
Run Code Online (Sandbox Code Playgroud)
我在OS X 10.8.5上使用带有VirtualEnv和macports的python 2.7.6
我明白问题是缺少底层依赖("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
但这会导致像我遇到的那样的意外行为,无论如何通过注释掉它,一切似乎都有效!