Error when install scanpy

Hi all,

I want to install scanpy on Jupyter notebook so I run:

! pip3 install scanpy, I got this:

WARNING: You are using pip version 21.1.1; however, version 22.2.2 is available.
You should consider upgrading via the ‘/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip’ command.

Then: import scanpy as sc doesn’t work even though I updated pip to 22.2.2.

What did I miss in this case? Thank you!

Hi,

the warning is not relevant for your purpose here. Please ensure that you are using the correct kernel when attempting to import scanpy in your jupyter notebook.

1 Like

I got the error below which made me think the reason maybe because of the installation.

sc.pp.highly_variable_genes(adata, n_top_genes = 2000, subset = True, flavor = ‘seurat_v3’)

ModuleNotFoundError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.8/site-packages/scanpy/preprocessing/_highly_variable_genes.py in _highly_variable_genes_seurat_v3(adata, layer, n_top_genes, batch_key, check_values, span, subset, in place)

52 try: —>

53 from skmisc.loess import loess

54 except ImportError: ModuleNotFoundError: No module named ‘skmisc’

I run this code:

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

I solved the error. Thank you.

1 Like