sudo easy_install python-jenkins
을 사용하여 Mac에 jenkins 패키지를 설치했습니다. 설치가 잘되었지만 오류는 없었지만 파이썬을 열고 import jenkins
을 입력하면 다음 오류가 발생합니다.python의 import jenkins가 Mac에서 실행되지 않습니다.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.7-intel/egg/jenkins.py", line 9, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 431, in LoadLibrary
return self._dlltype(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Library/Python/2.7/site-packages/lookup3.so, 6): image not found
이 검색 결과는 도움이되지 않았습니다.
역 추적은 편집
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "jenkins.py", line 9, in <module>
lookup3 = cdll.LoadLibrary(os.path.join(get_python_lib(), "lookup3.dynlib"))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 431, in LoadLibrary
return self._dlltype(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Library/Python/2.7/site-packages/lookup3.dynlib, 6): image not found
위의 디렉토리에는'jenkins.py'를 찾을 수 없습니다.이 두 파일'jenkins-1.0.2-py2.7-macosx-10.7-intel.egg python_jenkins-0.2-py2.7이 있습니다. .egg' – cyberbemon
@ cyberbemon : 오른쪽, 계란은 zip 파일로 설치되었습니다. 'easy_install -ZU jenkins'를 사용하여 다시 설치하거나'.egg' 파일을 손으로 압축을 풀고 파일을 같은 이름으로 변경된 결과 디렉토리로 대체하십시오 ('jenkins-1.0.2-py2.7 -macosx-10.7-intel.egg'는 똑같은 이름을 가진 새로운 디렉토리가됩니다). –
'easy_install -ZU jenkins' 결과가 나오지 않아서'gzip python_jenkins-0.2-py2.7.egg'를 시도했고 이제는'python_jenkins-0.2-py2.7.egg.gz'라는 파일을 가지고 있다고 생각합니다. 나는 나쁘게 망쳤다! – cyberbemon