Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error during AMICI installation on WSL #2467

Closed
LarkinIt opened this issue Jun 25, 2024 · 4 comments · Fixed by #2468
Closed

CMake Error during AMICI installation on WSL #2467

LarkinIt opened this issue Jun 25, 2024 · 4 comments · Fixed by #2468
Assignees
Labels
bug cmake CMake related issue

Comments

@LarkinIt
Copy link

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

  • OS and version: Ubuntu 20.04 on WSL 1
  • AMICI interface: Python 3.12.4 (I also encountered this problem with Python 3.10)
  • AMICI version: 0.25.2

Thanks so much!

@LarkinIt LarkinIt added the new Newly created label Jun 25, 2024
@dweindl
Copy link
Member

dweindl commented Jun 26, 2024

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 added a commit to dweindl/AMICI that referenced this issue Jun 26, 2024
Set SUNDIALS_ROOT to ensure we are finding the sundials CMake config from the vendored library and not any other installation.

Fixes AMICI-dev#2467.
@dweindl
Copy link
Member

dweindl commented Jun 26, 2024

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.

@dweindl dweindl added cmake CMake related issue bug and removed new Newly created labels Jun 26, 2024
@dweindl dweindl self-assigned this Jun 26, 2024
@dweindl dweindl linked a pull request Jun 26, 2024 that will close this issue
@LarkinIt
Copy link
Author

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
Copy link
Member

dweindl commented Jun 28, 2024

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

@dweindl dweindl closed this as completed in f8ce650 Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cmake CMake related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants