How to fix this error when install scanpy?

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

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!

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 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

1 Like