Search code examples
pythoninterfacescipipopt

After compiling scip with IPOPT=true make SHARED=true scipoptlib, cannot run from pyscipopt.scip import Model


I have compiled scip with:

$ IPOPT=true make SHARED=true scipoptlib

It has compiled successfully and I run python setup.py install of the python interface. However, when I run from pyscipopt.scip import Model in Python, I get the following error message:

ImportError: scip-3.2.1/interfaces/python/lib/libscipopt.so: undefined symbol: _ZTIN5Ipopt7JournalE

Solution

  • You need to adapt the setup.py to also include Ipopt as library to link to.

    It's close to the end of the file and is called libraries in the definition of the Cython extension.