How to fix ModuleNotFoundError: No module named 'skmisc'?

Hi all,

After running as instruction message I still got error:

pip install --user scikit-misc

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

ModuleNotFoundError Traceback (most recent call last) /usr/local/lib/python3.7/dist-packages/scanpy/preprocessing/_highly_variable_genes.py in _highly_variable_genes_seurat_v3(adata, layer, n_top_genes, batch_key, check_values, span, subset, inplace) 52 try: —> 53 from skmisc.loess import loess 54 except ImportError:

ModuleNotFoundError: No module named ‘skmisc’

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last) 2 frames /usr/local/lib/python3.7/dist-packages/scanpy/preprocessing/_highly_variable_genes.py in _highly_variable_genes_seurat_v3(adata, layer, n_top_genes, batch_key, check_values, span, subset, inplace) 54 except ImportError: 55 raise ImportError( —> 56 ‘Please install skmisc package via `pip install --user scikit-misc’ 57 ) 58 df = pd.DataFrame(index=adata.var_names)

ImportError: Please install skmisc package via `pip install --user scikit-misc


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the

“Open Examples” button below.

The code is from: sanbomics_scripts/single_cell_analysis_complete_class.ipynb at main · mousepixels/sanbomics_scripts · GitHub

Thank you so much!