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

**URL:** https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817
**Category:** Help
**Created:** [October 12, 2022, 7:54pm UTC](https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817 "2022-10-12T19:54:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Chris](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@Chris](https://discourse.scverse.org/u/Chris)
#### Post date: [October 12, 2022, 7:54pm UTC](https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817/1 "2022-10-12T19:54:55Z")

</div>

Hi all,

After running as instruction message I still got error:

```auto
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](https://github.com/mousepixels/sanbomics_scripts/blob/main/single_cell_analysis_complete_class.ipynb)

Thank you so much!

---

<div class="post-metadata">

### Author: ![willyroqueb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/willyroqueb/32/470_2.png) [@willyroqueb](https://discourse.scverse.org/u/willyroqueb)
#### Post date: [December 9, 2022, 10:57pm UTC](https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817/2 "2022-12-09T22:57:12Z")

</div>

How did you solve this issue? having the same problem

---

<div class="post-metadata">

### Author: ![adamgayoso](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/adamgayoso/32/100_2.png) [@adamgayoso](https://discourse.scverse.org/u/adamgayoso)
#### Post date: [December 10, 2022, 2:57am UTC](https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817/3 "2022-12-10T02:57:37Z")

</div>

Perhaps just try `pip install skmisc`? or if you’re in a conda environment `conda install -c conda-forge scikit-misc`

---

<div class="post-metadata">

### Author: ![willyroqueb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/willyroqueb/32/470_2.png) [@willyroqueb](https://discourse.scverse.org/u/willyroqueb)
#### Post date: [December 10, 2022, 12:51pm UTC](https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817/4 "2022-12-10T12:51:44Z")

</div>

> [@adamgayoso](#):
>
> conda install -c conda-forge scikit-misc

No luck with any of those options. I keep getting the same error. It’s driving me crazy because I can run it well on google colab.

## Output exceeds the size limit. Open the full output data in a text editor

ImportError Traceback (most recent call last)  
File c:\Users\user\miniconda3\lib\site-packages\scanpy\preprocessing\_highly\_variable\_genes.py:53, 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:

File ~\AppData\Roaming\Python\Python39\site-packages\skmisc\loess\__init_\_.py:51  
1 “”"  
2 =================================================  
3 Locally-weighted regression (:mod:`skmisc.loess`)  
(…)  
49 pp. 829–836. 1979.  
50 “”"  
—\> 51 from .\_loess import (loess, loess\_model, loess\_inputs, loess\_control,  
52 loess\_outputs, loess\_prediction,  
53 loess\_confidence\_intervals, loess\_anova)  
56 **all** = [‘loess’, ‘loess\_model’, ‘loess\_control’, ‘loess\_inputs’,  
57 ‘loess\_model’, ‘loess\_outputs’, ‘loess\_prediction’,  
58 ‘loess\_confidence\_intervals’, ‘loess\_anova’]

ImportError: DLL load failed while importing \_loess: The specified module could not be found.

During handling of the above exception, another exception occurred:  
…  
57 )  
58 df = pd.DataFrame(index=adata.var\_names)  
59 X = adata.layers[layer] if layer is not None else adata.X

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

---

<div class="post-metadata">

### Author: ![Chris](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@Chris](https://discourse.scverse.org/u/Chris)
#### Post date: [April 11, 2023, 5:22pm UTC](https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817/5 "2023-04-11T17:22:07Z")

</div>

I didn’t use Scanpy for a few months so not sure what I did. I got several errors when using Scanpy. Try to uninstall the package and reinstall it. It worked for one of the errors I got.

---

<div class="post-metadata">

### Author: ![safa](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@safa](https://discourse.scverse.org/u/safa)
#### Post date: [July 3, 2023, 12:14pm UTC](https://discourse.scverse.org/t/how-to-fix-modulenotfounderror-no-module-named-skmisc/817/6 "2023-07-03T12:14:03Z")

</div>

Hello , I have the same issue . How did u solve it please ?
