# How to fix this error when install scanpy?

**URL:** <https://discourse.scverse.org/t/how-to-fix-this-error-when-install-scanpy/812>\
**Category:** Help\
**Created:** [October 8, 2022, 9:11pm UTC](https://discourse.scverse.org/t/how-to-fix-this-error-when-install-scanpy/812 "2022-10-08T21:11:47Z")\
**Posts on this page:** 2\
**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 8, 2022, 9:11pm UTC](https://discourse.scverse.org/t/how-to-fix-this-error-when-install-scanpy/812/1 "2022-10-08T21:11:47Z")

</div>

Hi all,

I run

conda install -c conda-forge scanpy python-igraph leidenalg  
pip install scanpy

from:  
[https://scanpy.readthedocs.io/en/stable/installation.html](https://scanpy.readthedocs.io/en/stable/installation.html)

I got this error:

Collecting zipp\>=0.5  
Downloading zipp-3.9.0-py3-none-any.whl (5.8 kB)  
Using legacy ‘setup.py install’ for umap-learn, since package ‘wheel’ is not installed.  
Using legacy ‘setup.py install’ for session-info, since package ‘wheel’ is not installed.  
Using legacy ‘setup.py install’ for pynndescent, since package ‘wheel’ is not installed.  
Installing collected packages: stdlib\_list, pytz, zipp, tqdm, threadpoolctl, session-info, scipy, patsy, networkx, natsort, llvmlite, joblib, h5py, scikit-learn, pandas, importlib-metadata, statsmodels, seaborn, numba, anndata, pynndescent, umap-learn, scanpy  
Running setup.py install for session-info … error  
error: subprocess-exited-with-error

× Running setup.py install for session-info did not run successfully.  
│ exit code: 1  
╰─\> [30 lines of output]  
running install  
running build  
running build\_py  
creating build

Do you know how to fix this error? Thank you so much!

---

<div class="post-metadata">

**Author:** ![DRSEI](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/drsei/32/172_2.png) [@DRSEI](https://discourse.scverse.org/u/DRSEI)\
**Post date:** [October 19, 2022, 7:03am UTC](https://discourse.scverse.org/t/how-to-fix-this-error-when-install-scanpy/812/2 "2022-10-19T07:03:58Z")

</div>

Hi Chris,

Scanpy can be installed via conda or pip. Personally I recommend conda for beginner users.

1. Install Conda. We typically use the [Miniconda](https://conda.io/miniconda.html) Python distribution. Use Python version \>=3.9.
2. Create a new conda environment:

`conda create -n scanpy-env python=3.9`

1. Activate your environment:

`conda activate scanpy-env`

1. Install the Scanpy to conda env

`conda install -c conda-forge scanpy python-igraph leidenalg`
