Importing cvxopt.base in C API (import_cvxopt() method) results in Undefined reference error.

59 views
Skip to first unread message

aatif...@arbisoft.com

unread,
Nov 29, 2017, 9:40:15 AM11/29/17
to CVXOPT

I have a matlab script which is calling the C++ code which utilizes C API of cvxopt library. When i call the method import_cvxopt(), i get the following error

'/usr/local/lib/python2.7/dist-packages/cvxopt/base.so: undefined symbol: PyBool_Type'

I also have a simple C++ program which tests the C API code for cvxopt, in this program, the code runs fine and there is no error reported.

Any suggestions about what could be the reason for this error?


aatif...@arbisoft.com

unread,
Dec 21, 2017, 7:54:16 AM12/21/17
to CVXOPT
So i found the solution of this problem, just in case someone face the same problem. You need to load the python library before starting the process. So maybe set the LD_PRELOAD variable as the python library. e.g

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

Thank you
Reply all
Reply to author
Forward
0 new messages