Issue with WSL Ubuntu installation

I think I am having an issue with versions. I’m able to get most of the way through the installation steps, but I get this error when I’m installing the python interface. I’ve cleared everything and restarted the install, but always get stuck here. Does anyone have advice on how to get around this error?

ERROR: Could not find a version that satisfies the requirement fenics-ffcx<0.11.0,>=0.10.0.dev0 (from fenics-dolfinx) (from versions: 0.4.1.post0, 0.4.2, 0.5.0.post0, 0.6.0, 0.7.0, 0.8.0, 0.9.0)
ERROR: No matching distribution found for fenics-ffcx<0.11.0,>=0.10.0.dev0

We would need to have way more information about:

  1. How you installed the other packages (basix, ufl, dolfinx)
  2. How you are trying to install FFCx.

I’ve just followed the “from source” installation directions on GitHub - FEniCS/dolfinx: Next generation FEniCS problem solving environment

As seen in the detailed instructions that are linked below in the page you sent, you see that there are several dependencies that has to be manually installed if you choose that path, and not spack, conda or Debian packages.
https://docs.fenicsproject.org/dolfinx/main/python/installation#dependencies

Source Installation of DOLFINx requires installation of the C++ core. Most users will also want the Python interface. An example of how to build DOLFINx and its dependencies can be found in our RedHat Dockerfile and RedHat GitHub Actions workflow for a minimal set of tested steps that can be adapted to suit most Unix-like systems.

I think I’ve installed all of those dependencies, but the only available ffcs version (FEniCS Form Compiler ‘X’ documentation — FEniCS Form Compiler X 0.10.0.dev0 documentation) is 0.9.0, while dolfinx and basix install as 0.10.0 from the source and aren’t compatible with ffcx 0.9.0.

In the RedHat GitHub Actions workflow you linked, these sets of commands install an incompatible version of ffcx with the versions of dolfinx and basix on my system.

python3 -m pip install git+https://github.com/fenics/ufl.git@${{ needs.fenicsx-refs.outputs.ufl_ref }}
python3 -m pip install git+https://github.com/fenics/basix.git@${{ needs.fenicsx-refs.outputs.basix_ref }}
python3 -m pip install git+https://github.com/fenics/ffcx.git@${{ needs.fenicsx-refs.outputs.ffcx_ref }}

Have you tried the command I have quoted from you, without the
@{{….}}
What does it give as output?

the command you quoted gives:

ERROR: Could not find a version that satisfies the requirement fenics-ufl<2024.4.0,>=2024.3.0.dev0 (from fenics-ffcx) (from versions: 2017.1.0.post1, 2017.2.0, 2018.1.0, 2019.1.0, 2022.1.0.post0, 2022.2.0, 2023.1.0, 2023.1.1.post0, 2023.2.0, 2024.1.0.post0, 2024.1.0.post1, 2024.2.0)
ERROR: No matching distribution found for fenics-ufl<2024.4.0,>=2024.3.0.dev0

So then lets start with installing ufl, i.e.

python3 -m pip install git+https://github.com/fenics/ufl.git

then basix:

python3 -m pip install git+https://github.com/fenics/basix.git

then ffcx.

As a side note, is there a specific motivation for building from source, and not using any of our other alternatives for installation?

the UFL install line gives this error:

fenics-ffcx 0.9.0 requires fenics-basix<0.10.0,>=0.9.0, but you have fenics-basix 0.10.0.dev0 which is incompatible.
fenics-ffcx 0.9.0 requires fenics-ufl<2024.3.0,>=2024.2.0, but you have fenics-ufl 2024.3.0.dev0 which is incompatible.

I started installing from the source because this code from the homepage (below) gave me a series of errors about missing functions when trying to run the poisson demo, and I hoped manually installing the most up-to-date dependencies could get around those errors.

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

removed all of the related files and started over. I’m getting a bit further now, everything seems to be on version 0.10.0.dev now