Hi, I am new to scvi.
I used jupyterlab and my python version is 3.9.5.
I installed scvi following the tutorial.
pip install scvi-tools
I am able to import scvi to my jupyterlab.
However, when I tried to use it, it reminds me it does not has this attribute or that attribute.
For example,
adata = scvi.data.heart_cell_atlas_subsampled() Error: module ‘scvi’ has no attribute ‘data’
scvi.settings.seed = 420 Error: module ‘scvi’ has no attribute ‘settings’
Do you have a file named scvi.py in the directory where you’re running your notebook? If so, that might be the issue, try deleting or moving that file elsewhere, then re-start your jupyter kernel and import scvi again.
When you type scvi at the Python prompt you should get: <module 'scvi' from '<your_path>/lib/python3.7/site-packages/scvi/__init__.py'>
Thank you so much. Problem solved.
I doubt this happened because when I installed scvi-tools the first time, I used the wrong command: pip install scvi
although I uninstalled scvi later and installed scvi-tools, I was not able to correctly import scvi-tools.
After I uninstall all scvi, scvi-tools from my global and virtual environment and reinstalled scvi-tools, problem solved.