If you do not have a working Python 3.5 or 3.6 installation, consider installing Miniconda (see Installing Miniconda). Then run:

conda install seaborn scikit-learn statsmodels numba pytables
conda install -c conda-forge python-igraph louvain

Pull Scanpy from PyPI (consider using pip3 to access Python 3):

pip install scanpy

PyPI only

If you prefer to exlcusively use PyPI run:

pip install scanpy[louvain]


pip install scanpy python-igraph louvain

The extra [louvain] installs two packages that are needed for parts of scanpy but aren’t requirements: python-igraph [Csardi06] and louvain [Traag17].


Using bioconda, simply run:

conda install -c bioconda scanpy

Development Version

To work with the latest version on GitHub: clone the repository and cd into its root directory. To install using symbolic links (stay up to date with your cloned version after you update with git pull) call:

pip install -e .


If you’re using Docker, you can use the minimal fastgenomics/scanpy image from the Docker Hub.

Trouble shooting

If you do not have sudo rights (you get a Permission denied error):

pip install --user scanpy

On MacOS, if not using conda, you might need to install the C core of igraph via homebrew first

  • brew install igraph

  • If python-igraph still fails to install, see here or consider installing gcc via brew install gcc --without-multilib and exporting export CC="/usr/local/Cellar/gcc/X.x.x/bin/gcc-X"; export CXX="/usr/local/Cellar/gcc/X.x.x/bin/gcc-X", where X and x refers to the version of gcc; in my case, the path reads /usr/local/Cellar/gcc/6.3.0_1/bin/gcc-6.

Installing Miniconda

After downloading Miniconda, in a unix shell (Linux, Mac), run

chmod +x

and accept all suggestions. Either reopen a new terminal or source ~/.bashrc on Linux/ source ~/.bash_profile on Mac. The whole process takes just a couple of minutes.