首页 > 解决方案 > jenkins python模块导入错误

问题描述

我已经在 VM 中安装了 jenkins 模块,但仍然无法导入模块并使用。

linux2 上的 Python 2.7.5(默认,2014 年 6 月 17 日,18:11:42)[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] 键入“帮助”、“版权”、“信用”或“许可证” “ 了解更多信息。

import jenkins
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/jenkins.py", line 9, in <module>
lookup3 = cdll.LoadLibrary(os.path.join(get_python_lib(), "lookup3.so"))
File "/usr/lib64/python2.7/ctypes/__init__.py", line 438, in LoadLibrary
return self._dlltype(name)
File "/usr/lib64/python2.7/ctypes/__init__.py", line 360, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/python2.7/site-packages/lookup3.so: cannot open shared object file: No such file or directory

标签: pythonpython-2.7python-module

解决方案


你有没有通过这个命令安装jenkins?

pip install jenkins

如果是,你应该尝试安装它

pip install python-jenkins

参考:错误


推荐阅读