首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SCIP:导入模型时PySCIPOpt错误

SCIP:导入模型时PySCIPOpt错误
EN

Stack Overflow用户
提问于 2017-09-24 13:54:22
回答 1查看 1.9K关注 0票数 0

`dfg@dfg:~/prog/ciplop恙ite-4.0.1/构建$ cmake .-DREADLINE=off --构建类型:版本--构建共享库: ON --构建类型:版本--旧编译器的遗留模式: OFF --无法找到IPOPT (缺失: IPOPT_LIBRARIES) --无法找到条件(缺失: CRITERION_LIBRARY CRITERION_INCLUDE_DIR) --已经找到以下可选包:

  • ZLIB
  • GMP

-已找到下列所需的包裹:

  • 野牛
  • FLEX
  • SOPLEX
  • SCIP

-没有找到下列可供选择的包裹:

  • IPOPT
  • 判据

-配置完成--生成完成--构建文件已写入:/home/dfg/prog/sciop恙ite-4.0.1/ Build‘

错误:找不到libscip.so我试图运行github中提供的'atsp.py‘示例,但遇到了一个错误:

代码语言:javascript
复制
/home/dfg/thesis/programming/python_envs/scip_env/bin/python3.6 atsp.py
Traceback (most recent call last):
  File "atsp.py", line 10, in <module>
    from pyscipopt import Model, quicksum, multidict
  File "/home/dfg/thesis/programming/python_envs/scip_env/lib/python3.6/site-packages/pyscipopt/__init__.py", line 3, in <module>
    from pyscipopt.scip      import Model
ImportError: /opt/scipoptsuite-4.0.1/lib/libscip.so: undefined symbol: history_length

我的机器是Ubuntu16.04 64位,SCIP优化4.0.1安装在/opt/sciop恙ite-4.0.1中。

我使用的是Python3.6和Python编辑器Pycharm的虚拟Python环境。

我真的被困住了。

我用CMake重新安装了枕尘矿,然后使测试在scipoptdir内工作良好。正如在[https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/INSTALL.rst]中提到的,我还有子目录库和包含。我还运行这个命令make install INSTALLDIR=$SCIPOPTDIR SHARED=true。然后,我得到了下面的错误,(scip_env) dfg@dfg:~/thesis/programming/scip-pfd$ python3.6 atsp.py Traceback (most recent call last): File "atsp.py", line 10, in <module> from pyscipopt import Model, quicksum, multidict File "/home/dfg/thesis/programming/python_envs/scip_env/lib/python3.6/site-packages/pyscipopt/__init__.py", line 3, in <module> from pyscipopt.scip import Model ImportError: libscip.so: cannot open shared object file: No such file or directory,我需要做一些链接或导出一个变量吗?非常感谢!问候

EN

回答 1

Stack Overflow用户

发布于 2017-10-05 19:23:54

谢谢你@mattmillen,我已经照你的建议做了。我已经删除了我以前的副业选择,然后重新安装与cmake和读行关闭。在命令行(scip_env) dfg@dfg:~/thesis/programming/scip-pfd$ python atsp.py Miller-Tucker-Zemlin's model: Optimal value: 330.0 x(1,4) = 1.0 x(2,3) = 1.0 x(3,5) = 1.0 x(4,2) = 1.0 x(5,1) = 1.0 u(5) = 4.0 u(2) = 2.0中工作得很好。

此外,我将位于./scipoptsuite/build/lib/libscip.so./scipoptsuite/build/lib/libscip.so复制到/usr/local/lib/libscip.so。然后,这也适用于编辑器PyCharm :)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46390802

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档