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

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

Requirements and dependencies

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

  • NumPy

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

Installation instructions

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

pip install .

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

pip install --prefix=<some directory> .