Search code examples
pythoninterfacescip

Problem when importing PySCIPOpt. AttributeError: type object 'pyscipopt.scip.Expr' has no attribute '__div__'


I want to use python interface for SCIP; I installed PySCIPOpt following these steps.

I'm using SCIP7, PySCIPOpt 3, and python 3.7. SCIP's interactive shell alone works well. However, when I try to import pyscipopt, I get the following error

File "src/pyscipopt/scip.pyx", line 1, in init pyscipopt.scip AttributeError: type object 'pyscipopt.scip.Expr' has no attribute 'div'

My operating system is Linux Mint 19.2

I tried to test the installation as suggested, and I get the errors in the imageenter image description here


Solution

  • The problem seems to be an update in cython. It should be fixed in the current master of PySCIPOpt. See also https://github.com/SCIP-Interfaces/PySCIPOpt/issues/397