Since emcee is a pure Python module, it should be pretty easy to install. All you’ll need numpy. There are a bunch of different ways to install and I’ll mention a few below but by far the best is to install into a virtual environment using pip.

Using pip

The easiest way to install the most recent stable version of emcee is with pip:

$ pip install emcee

You might need to run this using sudo depending on your Python installation. You can also use easy_install:

$ easy_install emcee

but pip is probably better.

From source

Alternatively, you can get the source by downloading a tarball:

$ curl -OL

or zip archive:

$ curl -OL

Once you’ve downloaded and unpacked the source, you can navigate into the root source directory and run:

$ python install

Bleeding edge development version

emcee is being developed actively on GitHub so if you feel like hacking, you can clone the source repository

git clone

or fork the repository.

Test the installation

To make sure that the installation went alright, you can run some unit tests by running:

python -c 'import emcee; emcee.test()'

or, if you have nose:


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