Ubuntu and Conda installation problems

I did install dolfinx through ubuntu. I realised it is not in it’s latest version, which is rather inconvenient for the code I’ll be using.

I downloaded dolfinx using:
add-apt-repository ppa:fenics-packages/fenics
apt update
apt install fenicsx

I have DOLFINx version: 0.4.1. When trying to update it I get the message ‘python3-dolfinx is already the newest version (1:0.4.1-1exp2)’. I did not find a way to update it, does anyone know how to deal with this?

As I was very unsuccessful getting the newest version, I moved on to Windows + conda. I followed the lines:

conda config --add channels conda-forge
conda config --set channel_priority strict
conda install fenics-dolfinx fenics-libdolfinx

and I get the following error:

Retrieving notices: …working… done
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels.

I can’t find the issue. The conda-forge channel is there but for some reason it can’t find the package. I am not an expert programming and I really don’t know what else to try. Any help regarding this matter would be very much appreciated.

Hi Sofia, the PPA provides dolfinx v0.5, not v0.4. I guess you’re still using Ubuntu focal (20.04), which is stuck at v0.4 due to the old gcc v9 compiler (current dolfinx needs the C++20 standard). Are you able to upgrade your ubuntu installation, e.g. to jammy (22.04) ? That will help accessing latest versions.

The required libraries are not available on Windows (hence not available via conda on Windows). For Windows systems you’d need to use WSL (Windows System for Linux) and install inside that virtual linux environment, which is ubuntu.

Using conda on ubuntu may be an option, but upgrading the ubuntu installation would be simpler, if possible.

2 Likes

Hi! Thanks for your help. I’ve managed to upgrade ubuntu to jammy 22.04 and upgraded dolfinx. However, I could only upgrade it from 0.4.1 to 0.5.2. It doesn’t seem to be upgradable to 0.6, is this the case or I might be missing something? Thanks again!

v0.6 is not yet available on the PPA due to some ufl conflicts, see ufl 2023.1 breaks old dolfin · Issue #151 · FEniCS/ufl · GitHub
I think it will be resolved soon.