Skip to content

scanpy installation on colab without any GPU's #3345

Closed as duplicate of#1749
Closed as duplicate of#1749
@CRISTIANJULIOCESAR

Description

@CRISTIANJULIOCESAR

Please make sure these conditions are met

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of scanpy.
  • (optional) I have confirmed this bug exists on the main branch of scanpy.

What happened?

There's an issue with the installation of scanpy in Colab when working without GPUs, only using the CPU, which is my intention to avoid consuming computational units. This doesn't allow me to import scanpy; I get the following error:


ImportError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/cupy/init.py in
16 try:
---> 17 from cupy import _core # NOQA
18 except ImportError as exc:

10 frames
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

ImportError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/cupy/init.py in
17 from cupy import _core # NOQA
18 except ImportError as exc:
---> 19 raise ImportError(f'''
20 ================================================================
21 {_environment._diagnose_import_error()}

ImportError:

Failed to import CuPy.

If you installed CuPy via wheels (cupy-cudaXXX or cupy-rocm-X-X), make sure that the package matches with the version of CUDA or ROCm installed.

On Linux, you may need to set LD_LIBRARY_PATH environment variable depending on how you installed CUDA/ROCm.
On Windows, try setting CUDA_PATH environment variable.

Check the Installation Guide for details:
https://docs.cupy.dev/en/latest/install.html

Original error:
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.

Minimal code sample

!pip install scanpy
import scanpy as sc

Error output

No response

Versions


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions