UFCx could not be found (Ubuntu - source)

Hello there.
I try to install dolfinx and have this problem:

(fenics_env) paul@PCxxx:~/dolfinx/cpp/build$ cmake ..
-- Asking Python module FFCx for location of ufcx.h...
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find UFCx: Found unsuitable version "0.9.0", but required is at
  least "0.10" (found
  /home/paul/fenics_env/lib/python3.12/site-packages/ffcx/codegeneration)
      Reason given by package: UFCx could not be found.

PS
I did ffcx with pip install fenics-ffcx:

Installing collected packages: setuptools, pycparser, numpy, fenics-ufl, fenics-basix, cffi, fenics-ffcx
Successfully installed cffi-1.17.1 fenics-basix-0.9.0 fenics-ffcx-0.9.0 fenics-ufl-2024.2.0 numpy-2.2.2 pycparser-2.22 setuptools-75.8.0

You need to check at the correct branch of DOLFINx.
You have installed v0.9.0 of ffcx, and should therefore checkout the 0.9.0 release of DOLFINx.

Thank you for your reply.
How can I change the 0.9.0 release of DOLFINx and install them?

According to the website, the latest release is 0.9.0.

If you have cloned dolfinx with git clone, you can navigate to this repository on your computer, and call git checkout v0.9.0.post1
If you want to download the tar-ball, you can find it at:

i did’t clone dolfinx.
i followed step by step this instruction:
https://docs.fenicsproject.org/dolfinx/main/python/installation.html#source

First of all, there was an error with UFCx and I tried to install FFCx:

with: pip install fenics-ffcx

But it doest’t help.

Building DOLFINx from source is quite a complex thing to do, which is why we provide various ways which avoids you having to install each component by yourself. I would suggest having a look at: GitHub - FEniCS/dolfinx: Next generation FEniCS problem solving environment

I am assuming that you are running DOLFINx on a ubuntu based system, if so, you can have a look at: dolfinx/docker/Dockerfile.test-env at main · FEniCS/dolfinx · GitHub
which shows how to install all the core dependencies on ubuntu, and
dolfinx/docker/Dockerfile.end-user at main · FEniCS/dolfinx · GitHub
that shows how to install ufl, basix, ffcx and dolfinx.

However, I would recommend using, conda, docker or the apt binaries.

I have Windows and use Ubuntu for installation.
i used apt: Download | FEniCS Project

sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt update
sudo apt install fenicsx

If you have used apt for installation, there is no need for any further installation.

Sorry, l don’t understand.

It was apt for FENICSx, but i need also dolfinx.
I thought, that i need for dolfinx like that (from source):

https://docs.fenicsproject.org/dolfinx/main/python/installation.html

  1. C++ core
  2. Python dependencies

Dolfinx is the user facing API of the fenics project. By installing fenicsx from apt you have installed dolfinx, ffcx, basix and ufl along with any other dependency

1 Like