installation of assimulo and sundials - error

2.4k views Asked by At

I want to use Assimulo 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 as I understand it worked well.

% cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lib/sundials-3.1.1/  ~/opt/sundials/sundials-3.1.1
% make
% make install

Then I tried to install Assimulo with the command pip3 install Assimulo, but I get an error message. I also tried to follow the instructions on Installation - Assimulo 3.0 documentation by downloading the installation files and install it with the following command. It results in the same error message.

sudo python3 setup.py install --sundials-home=/usr/local/lib/sundials-3.1.1

This is the error message I get:

  target build/src.linux-x86_64-3.6/assimulo/thirdparty/hairer/dopri5module.c does not exist:
   Assuming dopri5module.c was generated with "build_src --inplace" command.
error: 'assimulo/thirdparty/hairer/dopri5module.c' missing

What is wrong and how can I fix it? Any help would be appreciated!

2

There are 2 answers

2
kossikater On

I got the same error when installing on macos via pip install assimulo, after pip-installing numpy and cython. For me, using a conda env did the trick:

  • Creating the conda env: conda create -n your_name_goes_here
  • conda activate your_name_goes_here
  • conda install python=3.6 (I noticed you can also use 3.7)
  • conda install -c conda-forge assimulo
1
Jaakko Luttinen On

I also had the same error message. As suggested in the other answer, you can get a compiled package from Conda. But if you want to compile from source yourself, it looks to me that PyPI source tarball doesn't contain all needed files. At least some *.pyf files are missing. So, I used SVN repo instead:

svn checkout https://svn.jmodelica.org/assimulo/tags/Assimulo-3.0/ assimulo

By compiling this source tree, I managed to get pass the original error you had, but I'm now having another build error that I don't know yet how to solve:

ssimulo/solvers/sundials.c: In function '__pyx_f_8assimulo_7solvers_8sundials_5CVode_initialize_cvode':
assimulo/solvers/sundials.c:33274:31: error: too many arguments to function 'CVodeCreate'
     __pyx_v_self->cvode_mem = CVodeCreate(__pyx_t_3, __pyx_t_4);