pip install fails without cuda

Issue #65 resolved
Tim Berberich created an issue

Hi Nathanaël,

calling 'pip install shtns' fails in building wheel on a check for cuda:

checking for gcc option to support OpenMP... -fopenmp
-L/opt/cuda/lib64 -L/opt/cuda/lib64/stubs
checking for cudaMalloc in -lcudart... no
configure: error: cudart library not found. Try adding LDFLAGS="-L/usr/local/cuda/lib64"
error: command './configure' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for shtns
Failed to build shtns
ERROR: Could not build wheels for shtns, which is required to install pyproject.toml-based projects

I don’t have cuda installed so failing to find it is expected. Is there an option to tell the installation process to skip the cuda check since I just want to use the CPU version of shtns.

The same error is thrown when using the installation via your git directly, i.e.:
./configure --enable-python
make
make install

Comments (4)

  1. Nathanaël Schaeffer repo owner

    Mmm, this is strange. This should only happen if you have the CUDA_PATH environment variable set.
    To explicitely disable cuda, try:

    CUDA_PATH= pip install shtns

    or

    unset CUDA_PATH
    pip install shtns
    

  2. Tim Berberich reporter

    Thanks for the help, this worked!
    It seems it was a problem on my side withe a leftover environment variable.

  3. Log in to comment