theislab / scgen

Single cell perturbation prediction
https://scgen.readthedocs.io
GNU General Public License v3.0
255 stars 51 forks source link

ImportError: cannot import name 'setup_anndata' from 'scvi.data' #66

Closed GA-1101 closed 2 years ago

GA-1101 commented 2 years ago

Hi, Thanks for your excellent contribution. I recently met an import issue: cannot import name 'setup_anndata' from 'scvi.data'

The initial script try to import 'setup_anndata' from the */scvi/data/__init__.py. It seems that the latest version of scvi-tools have no more 'setup_anndata' in 'init.py'. It showed error: ImportError: cannot import name 'setup_anndata' from 'scvi.data'

The latest version I installed of scvi-tools is '0.15.4', I downgrade the scvi-tools version to '0.9.0' so that the scgen can be import normally.

I think that may be an issue of the basic usage of scGen, could you please check the initial script and update related code to match the latest version of scvi-tools.

Lei

adamgayoso commented 2 years ago

Please see the latest tutorial: https://scgen.readthedocs.io/en/latest/tutorials/scgen_perturbation_prediction.html

The API changed slightly