To install ELFI, run this command in your terminal:

pip install elfi

If you don’t have pip installed, this Python installation guide can guide you through the process.

ELFI is currently tested only with Python 3.5. If you are new to Python, perhaps the simplest way to install it is Anaconda

Optional dependencies

Optionally you may wish to install also the following packages:

  • graphviz for drawing graphical models (Graphviz must be installed separately)

Virtual environment using Anaconda

If you want to create a virtual environment before installing, you can do so with Anaconda:

conda create -n elfi python=3.5 scipy
source activate elfi
pip install elfi

Potential problems with installation

ELFI depends on several other Python packages, which have their own dependencies. Resolving these may sometimes go wrong:

  • If you receive an error about missing numpy, please install it first.
  • If you receive an error about yaml.load, install pyyaml.
  • On OS X with Anaconda virtual environment say conda install and then use pythonw instead of python.
  • Note that ELFI currently supports Python 3.5 only, although 3.x may work as well.

From sources

The sources for ELFI can be downloaded from the Github repo.

You can either clone the public repository:

git clone

Or download the tarball:

curl  -OL

Note that for development it is recommended to base your work on the dev branch instead of master.

Once you have a copy of the source, you can install it with:

pip install -e .

This will install ELFI along with its default requirements.