scverse / anndata

Annotated data.
http://anndata.readthedocs.io
BSD 3-Clause "New" or "Revised" License
577 stars 154 forks source link

anndata version 0.11.0 throws ImportError in Google Colab #1749

Closed lauraluebbert closed 6 days ago

lauraluebbert commented 1 week ago

Please make sure these conditions are met

Report

Google Colab notebook replicating the error:
https://colab.research.google.com/drive/13sCN2rGb5P2udAV-YKJ2FM0iiA3QldXX?usp=sharing

Note: This error is fixed when the Colab runtime is switched to a GPU session. However, GPU sessions are expensive and Google Colab plays an increasingly important role in sharing transcriptomic data analysis code, so I think being able to use anndata on the free CPU runtime of Google Colab is essential.

(edit) Also note that this error does not occur for previous versions of anndata.

Versions

0.11.0 (cannot run this because import fails)
ilan-gold commented 6 days ago

For now, I would recommend uninstalling cupy-cuda12x i.e., pip uninstall cupy-cuda12x -y.

ilan-gold commented 6 days ago

A different fix is to upgrade cupy. That version of cupy has the not-very-helpful error-on-import (even if the module is there), but cupy>=0.13.0 does not, and works fine.

pip install --upgrade "cupy-cuda12x"