How to fix attributeError: module 'scvi' has no attribute 'model'?
0
0
Entering edit mode
18 months ago
Chris ▴ 260

Hi all,

I try to follow the tutorial below and get an error.

https://github.com/mousepixels/sanbomics_scripts/blob/main/single_cell_analysis_complete_class.ipynb

Many people got the same error but the solution doesn't work in my case:

https://github.com/scverse/scvi-tools/issues/824

scvi.model.SCVI.setup_anndata(adata)

vae = scvi.model.SCVI(adata)

vae.train()

--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-10-246da2622341> in <module>

----> 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.

scvi • 2.1k views
ADD COMMENT
0
Entering edit mode

I meet exact same error, could you please share how you solved the problem?

ADD REPLY
0
Entering edit mode

It was a long time ago so I am not sure what I did. Try to uninstall the package and reinstall it.

ADD REPLY
0
Entering edit mode

Yeah, it is. I solved the problem too. I think the problem is because I use pip install SCVI, but I actually need to pip instal SCVI-tools.

ADD REPLY
0
Entering edit mode

So the command pip install SCVI is not correct? Glad that you can fix the error.

ADD REPLY
1
Entering edit mode

Yes, you are correct. The author has stopped maintaining SCVI for a long time. We should use SCVI-tools instead.

ADD REPLY
0
Entering edit mode

Thanks for the info.

ADD REPLY

Login before adding your answer.

Traffic: 2415 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6