Reputation: 11
`dfg@dfg:~/prog/scipoptsuite-4.0.1/build$ cmake .. -DREADLINE=off -- Build type: Release -- Build shared libraries: ON -- Build type: Release -- LEGACY mode for old compilers: OFF -- Could NOT find IPOPT (missing: IPOPT_LIBRARIES) -- Could NOT find CRITERION (missing: CRITERION_LIBRARY CRITERION_INCLUDE_DIR) -- The following OPTIONAL packages have been found:
-- The following REQUIRED packages have been found:
-- The following OPTIONAL packages have not been found:
-- Configuring done -- Generating done -- Build files have been written to: /home/dfg/prog/scipoptsuite-4.0.1/build`
error : libscip.so not foundI am trying to run the 'atsp.py' example provided in github but I encountered an error:
/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
My machine is Ubuntu 16.04 64 bits with SCIP Optimization 4.0.1 installed in /opt/scipoptsuite-4.0.1
I am using a virtualenv Python environment with Python 3.6 and the Python editor Pycharm.
I am really stuck.
I re-installed scipoptsuite with CMake Then make test within scipoptdir works fine. I also have the sub-directories lib and include as mentioned at [https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/INSTALL.rst] . I also run this command make install INSTALLDIR=$SCIPOPTDIR SHARED=true
. Then I obtained the following error (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
Do I have to make some link or export a variable ? Thank You very much ! Regards
Upvotes: 0
Views: 2393
Reputation: 11
Thank You @mattmillen, I have done what you advised. I have deleted my previous scipsuiteopt then re-install with cmake and readline off. That works fine in command line (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
Moreover, I copied libscip.so
located at ./scipoptsuite/build/lib/libscip.so
to /usr/local/lib/libscip.so
. Then that also works with the editor PyCharm :)
Upvotes: 1