I have installed the fenicsx on my Ubuntu 22.04 as follows:
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt update
sudo apt install fenicsx
But when I try to import “dolfinx”, I get module not found error.
(carp) $ /usr/bin/python3
Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dolfinx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'dolfinx'
>>>
During the installation, it looks like it did install python3-dolfinx
but I cant locate it! There were no errors during installation.
...
Setting up python3-slepc4py (3.15.1-2build1) ...
Setting up python3-slepc4py-real (3.15.1-2build1) ...
Setting up libdolfinx-real-dev:amd64 (1:0.8.0-6~ppa3~jammy1) ...
Setting up libdolfinx-dev:amd64 (1:0.8.0-6~ppa3~jammy1) ...
Setting up python3-dolfinx-real (1:0.8.0-6~ppa3~jammy1) ...
Setting up python3-dolfinx:amd64 (1:0.8.0-6~ppa3~jammy1) ...
Setting up fenicsx (2:0.8.0.2~ppa1~jammy1) ...
...
However, the pip list does not show dolfinx having been installed.
(carp) $ /usr/bin/pip3 list|grep fenics
fenics-basix 0.8.0
fenics-ffcx 0.8.0
fenics-ufl 2024.1.0
(carp) $
Do I need to install and/or setup things differently? Please note that I already have a custom PETSc installed on my machine that I needed for openCARP. Could that be an issue? If yes, what is the work around?
There is one last thing which I have not done from the instructions:
conda install -c conda-forge fenics-dolfinx mpich pyvista
Could this be the missing link? I dont use conda at all. What is my best way forward? I use pyenv and poetry and switched away from Conda long time ago.
Thanks in advance
~anoop