`dfg@dfg:~/prog/ciplop恙ite-4.0.1/构建$ cmake .-DREADLINE=off --构建类型:版本--构建共享库: ON --构建类型:版本--旧编译器的遗留模式: OFF --无法找到IPOPT (缺失: IPOPT_LIBRARIES) --无法找到条件(缺失: CRITERION_LIBRARY CRITERION_INCLUDE_DIR) --已经找到以下可选包:
-已找到下列所需的包裹:
-没有找到下列可供选择的包裹:
-配置完成--生成完成--构建文件已写入:/home/dfg/prog/sciop恙ite-4.0.1/ Build‘
错误:找不到libscip.so我试图运行github中提供的'atsp.py‘示例,但遇到了一个错误:
/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,我需要做一些链接或导出一个变量吗?非常感谢!问候
发布于 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 :)
https://stackoverflow.com/questions/46390802
复制相似问题