AMICI-dev / AMICI

Advanced Multilanguage Interface to CVODES and IDAS
https://amici.readthedocs.io/
Other
108 stars 30 forks source link

CMake Error during AMICI installation on WSL #2467

Closed LarkinIt closed 3 months ago

LarkinIt commented 3 months ago

Hello, I am trying to install AMICI in a conda environment on WSL following the instructions described in the documentation. I first installed the dependencies as outlined in the documentation

The installation fails with a long error + traceback which I uploaded: amici_error_log.txt I think the error is from CMake according to part of the traceback output (around line 797 in amici_error_log.txt):

CMake Error in CMakeLists.txt:
        Imported target "SUNDIALS::generic_static" includes non-existent path

          "C:/Users/Caroline/anaconda3/Library/include"

        in its INTERFACE_INCLUDE_DIRECTORIES. 

To Reproduce Here are the steps I followed to install AMICI in WSL

  1. conda create --name test1 pip python
  2. conda activate test1
  3. conda install -c conda-forge openblas
  4. export BLAS_LIBS=-lopenblas
  5. pip install amici --no-cache

AMICI version and system environment

Thanks so much!

dweindl commented 3 months ago

Hi @LarkinIt, do you have a separate SUNDIALS package installed in the conda environment you are using?

 -- Found SUNDIALS: /mnt/c/Users/Caroline/anaconda3/Library/lib/cmake/sundials

This directory is unrelated to amici as far as I can tell. And also unrelated to your test1 conda environment?! It seems like amici is picking up some unrelated CMake files that contain the incorrect C:/Users/Caroline/anaconda3/Library/include. I will check why this might be the case.

Until then, you can either try it in a conda environment that does not not contain any sundials installation, or try a non-conda virtual environment python -m venv venv && source venv/bin/activate && pip install amici --no-cache.

dweindl commented 3 months ago

Until then, you can either try [...]

First, please try pip3 install -ve git+https://github.com/AMICI-dev/amici.git@develop#egg=amici\&subdirectory=python/sdist in your previous conda environment.

LarkinIt commented 3 months ago

Hi! My apologies with the late reponse. I do have multiple packages installed on Windows and WSL environments that use SUNDIALS (specifically libroadrunner and bionetgen) so I suspect it is referencing one of those. I tried running the command you suggested (pip3 install -ve git+https://github.com/AMICI-dev/amici.git@develop#egg=amici\&subdirectory=python/sdist) and that worked for me! Thanks so much!

dweindl commented 3 months ago

Thanks for the feedback. Glad it works. After the next release, pip install amici should work then.