How to fix attributeError: module 'scvi' has no attribute 'model'?

Hi all,

Many people got similar error (AttributeError: module 'scvi' has no attribute 'data' · Issue #824 · scverse/scvi-tools · GitHub ) but the solution install (Installation - scvi-tools) doesn’t work in my case.


vae = scvi.model.SCVI(adata)


--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in

----> 1 scvi.model.SCVI.setup_anndata(adata)

2 vae = scvi.model.SCVI(adata)

3 vae.train()

AttributeError: module ‘scvi’ has no attribute ‘model’

What is wrong in my case? Thank you so much!

Update: I figured it out.

Can you share what you figured out for the others reading this forum?

Sure, I uninstall using:

pip uninstall --yes scvi-tools

Then reinstall using:

conda install scvi-tools -c conda-forge