Need help with sphinx-gallery?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

237 Stars 136 Forks BSD 3-Clause "New" or "Revised" License 1.2K Commits 53 Opened issues


Sphinx extension for automatic generation of an example gallery

Services available


Need anything else?

Contributors list



.. image:: :target:

.. image:: :target:

.. image:: :target:

A Sphinx extension that builds an HTML version of any Python script and puts it into an examples gallery.

.. image:: doc/_static/demo.png :width: 80% :alt: A demo of a gallery generated by Sphinx-Gallery

Who uses Sphinx-Gallery

  • Sphinx-Gallery 
  • Scikit-learn 
  • Nilearn 
  • MNE-python 
  • PyStruct 
  • GIMLi 
  • Nestle 
  • pyRiemann 
  • scikit-image 
  • Astropy 
  • SunPy 
  • PySurfer 
  • Matplotlib 
    _ and
  • PyTorch tutorials 
  • Cartopy 
  • PyVista 
  • SimPEG 
  • PlasmaPy 
  • Fury 

.. installation-begin-content


Install via

You can do a direct install via pip by using:

.. code-block:: bash

$ pip install sphinx-gallery

Sphinx-Gallery will not manage its dependencies when installing, thus you are required to install them manually. Our minimal dependency is:

  • Sphinx >= 1.8.3

Sphinx-Gallery has also support for packages like:

  • Matplotlib
  • Seaborn
  • Mayavi

For much of this functionality, you will need

. We also recommend installing system
binaries to reduce the file sizes of the generated PNG files.

Install as a Sphinx-Gallery developer

You can get the latest development source from our

Github repository
_. You need
installed in your system to install Sphinx-Gallery. For example, you can do:

.. code-block:: console

$ git clone
$ cd sphinx-gallery
$ pip install -r dev-requirements.txt
$ pip install -e .

.. installation-end-content


If you would like to cite Sphinx-Gallery you can do so using our


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.