我使用sudo easy_install python-jenkins
在mac上安装了jenkins软件包。安装进行得很好,没有错误,但是当我打开python并键入import jenkins
时,出现以下错误。在python中导入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