2014-10-10 2 views
0

OS X 10.9.5에서 Python에서 Celery를 사용하려고하면 이상한 오류가 발생합니다. 이것은 이전에 사용되었지만 kombu.five를 가져올 때 C 라이브러리를 사용하지 못했습니다.Mac OS 10.9.5에서 kombu로 런타임 오류가 발생했습니다.

~$ 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 

나는 (brew install python를 통해 설치) 파이썬 2.7.8와 셀러리와 다시마 (pip install celery를 통해 설치)의 최신 버전을 사용하고 있습니다. 어떤 힌트?

다음
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입니다 :

여기 brew --config 내 출력

>>> 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 
+1

이 코드를 실행하면 어떻게됩니까? https://gist.github.com/tdsmith/1530c3cd52f151ec62b1 –

+0

@TimSmith 동일한 오류 메시지가 나타납니다 – calys

+0

출력이 전혀 없습니까? 실패한 곳은 어디입니까? –

답변

0

그것을 발견, 감사 TimSmith! Homebrew Python과 Paraview에서 사용하는 라이브러리 간에는 DYLD_FALLBACK_LIBRARY_PATH 환경 변수가 충돌했습니다.

관련 문제