IBM Support

"Undefined symbol: PyCObject_FromVoidPtr" when using LSF python API

Troubleshooting


Problem

After installing the LSF python API, sometimes the python API still cannot work with LSF: $ python Python 3.6.1 (default, May 11 2017, 19:56:03) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux Type "help", "copyright", "credits" or "license" for m11ore information. >>> from pythonlsf import lsf Traceback (most recent call last): File "", line 1, in File "/proj/mtk02966/python_3.6.1/lib/python3.6/site-packages/pythonlsf/lsf.py", line 25, in _lsf = swig_import_helper() File "/proj/mtk02966/python_3.6.1/lib/python3.6/site-packages/pythonlsf/lsf.py", line 21, in swig_import_helper _mod = imp.load_module('_lsf', fp, pathname, description) File "/proj/mtk02966/python_3.6.1/lib/python3.6/imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "/proj/mtk02966/python_3.6.1/lib/python3.6/imp.py", line 342, in load_dynamic return _load(spec) ImportError: /proj/mtk02966/python_3.6.1/lib/python3.6/site-packages/pythonlsf/_lsf.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyCObject_FromVoidPtr >>> Here, another issue is that "undefined symbol: PyCObject_FromVoidPtr". It is not an LSF issue, but an issue of CObject. Technically, this issue might happen because the version of SWIG is too old. This could be handled by upgrading the SWIG. For more information of SWIG, please check: http://www.swig.org/tutorial.html

Resolving The Problem

After installing the LSF python API, confirm if python can be used with lsf. Please get access into python and try to import lsf (run "from pythonlsf import lsf").

For the issue of "undefined symbol: PyCObject_FromVoidPtr", it is not an LSF problem but the issue of CObject. Technically, this issue might happen because the version of SWIG is too old. This could be handled by upgrading the SWIG.

For more information of SWIG, please check:
http://www.swig.org/tutorial.html

[{"Product":{"code":"SSETD4","label":"Platform LSF"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSETD4","label":"Platform LSF"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
Platform LSF

Software version:
Version Independent

Operating system(s):
Linux

Document number:
633057

Modified date:
17 June 2018

UID

isg3T1026350