FFC is normally installed as part of an installation of FEniCS. If you are using FFC as part of the FEniCS software suite, it is recommended that you follow the installation instructions for FEniCS.

To install FFC itself, read on below for a list of requirements and installation instructions.

Requirements and dependencies

FFC requires Python version 3.5 or later and depends on the following Python packages:

  • NumPy
  • six

FFC also depends on the following FEniCS Python packages:

  • FIAT
  • UFL
  • dijitso

These packages will be automatically installed as part of the installation of FFC, if not already present on your system.

TSFC requirements

To use experimental tsfc representation, additional dependencies are needed:

and in turn their additional dependencies:


TSFC requirements are not installed in FEniCS Docker images by default yet but they can be easilly installed on demand:

docker pull
docker run -ti --rm
  pip3 install --prefix=${FENICS_PREFIX} --no-cache-dir \
  git+ \
  git+ \
  git+ \
  singledispatch networkx pulp && \
  sudo rm -rf /tmp/* /var/tmp/*

The first two commands (or their modification, or fenicsproject helper script) are to be run on a host, while the last command, to be run in the container, actually installs all the TSFC requirements. For further reading, see FEniCS Docker reference.

[1](1, 2, 3) These are forks of the original packages tested to be compatible with FFC and updated frequently from upstream.
[2](1, 2, 3) Pip-installable.

Installation instructions

To install FFC, download the source code from the FFC Bitbucket repository, and run the following command:

pip3 install .

To install to a specific location, add the --prefix flag to the installation command:

pip3 install --prefix=<some directory> .