scverse / anndata

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

Newest Version of Anndata incompatible with scvi-tools #1200

Closed bykovam closed 1 year ago

bykovam commented 1 year ago

Please make sure these conditions are met

Report

import os
import anndata as ann
import numpy as np
import pandas as pd
import scanpy as sc
import scvi

Traceback:

File ~/beegfs/bykovam/anaconda3/envs/scvi-env/lib/python3.9/site-packages/scvi/data/_utils.py:13
     11 import scipy.sparse as sp_sparse
     12 from anndata import AnnData
---> 13 from anndata._core.sparse_dataset import SparseDataset
     15 # TODO use the experimental api once we lower bound to anndata 0.8
     16 try:

ImportError: cannot import name 'SparseDataset' from 'anndata._core.sparse_dataset' (/home/bykovam/beegfs/bykovam/anaconda3/envs/scvi-env/lib/python3.9/site-packages/anndata/_core/sparse_dataset.py)

Versions

Version of anndata is 0.10.1
Version of scvi-tools is 0.20.3
ivirshup commented 1 year ago

Thanks for the report.

This was fixed in the already released 0.10.2.

See also: https://github.com/scverse/scvi-tools/issues/2268