繁体   English   中英

Mac OS 10.9.5上的kombu运行时错误

[英]Runtime error with kombu on Mac OS 10.9.5

尝试在OS X 10.9.5上从python使用Celery时遇到一个奇怪的错误。 这曾经可以工作,但是现在(显然)在导入kombu.five时未使用某些C库。

~$ python
Python 2.7.8 (default, Aug 24 2014, 21:26:19)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import celery
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/celery/__init__.py", line 130, in <module>
    from celery import five
  File "/usr/local/lib/python2.7/site-packages/celery/five.py", line 51, in <module>
    from kombu.five import monotonic
  File "/usr/local/lib/python2.7/site-packages/kombu/five.py", line 52, in <module>
    absolute_to_nanoseconds = CoreServices.AbsoluteToNanoseconds
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found

我正在使用python 2.7.8(通过brew install python )和最新版本的celery和kombu(通过pip install celery )。 有什么提示吗?

这是我的brew --config输出:

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: c32db7bdaaedbf94d070ac13c1f8c42bd79c3853
Last commit: 51 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.9.5-x86_64
Xcode: 6.0.1
CLT: 6.0.0.0.1.1410400753
Clang: 6.0 build 600
X11: 2.7.6 => /opt/X11
System Ruby: 2.0.0-481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7

这是有关ctypes的更多输出:

>>> import ctypes, ctypes.util
>>> CoreServices = ctypes.CDLL(ctypes.util.find_library('CoreServices'))
>>> print CoreServices
<CDLL 'None', handle fffffffffffffffe at 10eac1e50>
>>> print CoreServices.AbsoluteToNanoseconds
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found

找到了,谢谢TimSmith! Homebrew Python和Paraview使用的库之间在DYLD_FALLBACK_LIBRARY_PATH环境变量中存在冲突。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM