[英]Problem when importing PySCIPOpt. AttributeError: type object 'pyscipopt.scip.Expr' has no attribute '__div__'
我想為SCIP
使用 python 接口; 我按照這些步驟安裝了PySCIPOpt
。
我正在使用SCIP7
、 PySCIPOpt
3 和 python 3.7。 SCIP
的交互式 shell 單獨運行良好。 但是,當我嘗試import pyscipopt
時,出現以下錯誤
文件“src/pyscipopt/scip.pyx”,第 1 行,在 init pyscipopt.scip AttributeError:類型 object 'pyscipopt.scip.Expr' 沒有屬性 ' div '
我的操作系統是 Linux Mint 19.2
問題似乎是 cython 的更新。 它應該在 PySCIPOpt 的當前 master 中修復。 另請參閱https://github.com/SCIP-Interfaces/PySCIPOpt/issues/397
python 對語法非常敏感,比如大寫等等。
所以你可以試試:
導入 PySCIPOpt 狀態導入 pyscipopt
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.