installation of scikits.odes and sundials - error
veiguf opened this issue · 6 comments
I want to use scikits.odes and Sundials for the solution of differential algebraic equations in Python and therefore I am trying to install it on Ubuntu.
For the installation of Sundials, I followed the installation instructions and for my understanding it worked well.
cmake -DLAPACK_ENABLE=ON -DCMAKE_INSTALL_PREFIX=/usr/local/lib/sundials-4.0.2/ -DEXAMPLES_INSTALL_PATH=/home/myname/opt/sundials/examples-4.0.2 /home/myname/opt/sundials/sundials-4.0.2
make
sudo make install
Then I tried to install scikits.odes with the command pip3 install scikits.odes
, but I get the following error message (the last rows of the terminal output).
In file included from /home/veit/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
from /home/veit/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/veit/.local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from scikits/odes/sundials/common_defs.c:639:
/home/veit/.local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
scikits/odes/sundials/common_defs.c:641:10: fatal error: sundials/sundials_types.h: Datei oder Verzeichnis nicht gefunden
#include "sundials/sundials_types.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: Command "x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/veit/.local/lib/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c scikits/odes/sundials/common_defs.c -o build/temp.linux-x86_64-3.6/scikits/odes/sundials/common_defs.o -MMD -MF build/temp.linux-x86_64-3.6/scikits/odes/sundials/common_defs.o.d" failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-z5r81sw1/scikits.odes/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-gbpyrsno-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-z5r81sw1/scikits.odes/
What is wrong and how can I fix it? Any help would be appreciated!
It looks like sundials isn't being found, you'll need to specify SUNDIALS_INST=/usr/local/lib/sundials-4.0.2/
, or you can install a modern version of sundials via apt if you're running 18.10 or higher.
Thank you for your answer!
Could you please tell me also how I can specify that? Sorry, but I am not an experienced Linux user...
I tried to simply put your string SUNDIALS_INST=/usr/local/lib/sundials-4.0.2/
in the terminal and then rerun pip3 install scikits.odes
, getting the same error message as before.
in a terminal:
export SUNDIALS_INST=/usr/local/lib/sundials-4.0.2/
test:
echo $SUNDIALS_INST
install:
pip3 install scikits.odes
Thank you very much!
Entering echo $SUNDIALS_INST
, I get /usr/local/lib/sundials-4.0.2/
and to me it looks to be correct.
From the installation of pip3 install scikits.odes
I get now an error message which looks a bit different. The error seems always related to Sundials.
In file included from scikits/odes/sundials/cvode.c:706:0:
/usr/local/lib/sundials-4.0.2/include/sunmatrix/sunmatrix_band.h:244:27: note: declared here
SUNDIALS_EXPORT SUNMatrix SUNBandMatrix(sunindextype N, sunindextype mu,
^~~~~~~~~~~~~
error: Command "x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/sundials-4.0.2/include -I/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl -I/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/include -I/opt/intel/compilers_and_libraries_2018.3.222/linux/mkl/lib -I/home/veit/.local/lib/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c scikits/odes/sundials/cvode.c -o build/temp.linux-x86_64-3.6/scikits/odes/sundials/cvode.o -MMD -MF build/temp.linux-x86_64-3.6/scikits/odes/sundials/cvode.o.d" failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-geu0o91_/scikits.odes/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-pqbhgasw-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-geu0o91_/scikits.odes/
You are using the newly released sundials series 4, 4.0.2.
I only tested sundials with series 3, 3.1.1, as given in our installation instruction.
Delete /usr/local/lib/sundials-4.0.2/, and install 3.1.1 instead to test
I uninstalled sundials-4.0.2 and reinstalled sundials-3.1.1 as you proposed. Then I had also to set export LD_LIBRARY_PATH=:/usr/local/lib/sundials-3.1.1/lib/
and now I were able to run succussfully the tests import scikits.odes as od; od.test()
. Thank you very much!!