Since emcee is a pure Python module, it should be pretty easy to install. All you’ll need numpy.


For pre-release versions of emcee, you need to follow the instructions in From source.

Package managers#

The recommended way to install the stable version of emcee is using pip

python -m pip install -U pip
pip install -U setuptools setuptools_scm pep517
pip install -U emcee

or conda

conda update conda
conda install -c conda-forge emcee

Distribution packages#

Some distributions contain emcee packages that can be installed with the system package manager as listed in the Repology packaging status. Note that the packages in some of these distributions may be out-of-date. You can always get the current stable version via pip or conda, or the latest development version as described in From source below.

From source#

emcee is developed on GitHub so if you feel like hacking or if you like all the most recent shininess, you can clone the source repository and install from there

python -m pip install -U pip
python -m pip install -U setuptools setuptools_scm pep517
git clone
cd emcee
python -m pip install -e .

Test the installation#

To make sure that the installation went alright, you can execute some unit and integration tests. To do this, you’ll need the source (see From source above) and py.test. You’ll execute the tests by running the following command in the root directory of the source code:

python -m pip install -U pytest h5py
python -m pytest -v src/emcee/tests

This might take a few minutes but you shouldn’t get any errors if all went as planned.