Following installation instructions for Ubuntu in an almost brand new Ubuntu 24.04 installation on WSL2, I got:
sudo apt install fenicsx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-dolfinx : Depends: python3-dolfinx-real but it is not installable or
python3-dolfinx-complex but it is not installable
E: Unable to correct problems, you have held broken packages.
The only thing I did after Ubuntu installation and before Fenicsx installation was to install pip and pyvista, a Python module required to run the very first demo of the tutorial, with
pip install pyvista --break-system-packages
Might installing pyvista after Fenicsx installation solve the issue ot the problem is due to --break-system-packages option?
Looks like you’re caught in the middle of the upgrade to 0.9. Try again later after the archive is finished updating.
In general pip install is safe for pyvista since it’s pure python, no C libraries. But to avoid interference with the deb packages, run it with --no-deps.
Thanks, Fenicsx installs now, but Python complains about multiple versions of matplotlib:
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvista
/home/nopria/.local/lib/python3.12/site-packages/matplotlib/projections/__init__.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.
warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvista
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nopria/.local/lib/python3.12/site-packages/pyvista/__init__.py", line 14, in <module>
from pyvista.core import *
File "/home/nopria/.local/lib/python3.12/site-packages/pyvista/core/__init__.py", line 6, in <module>
from . import _vtk_core
File "/home/nopria/.local/lib/python3.12/site-packages/pyvista/core/_vtk_core.py", line 20, in <module>
from vtkmodules.vtkCommonCore import vtkVersion
ModuleNotFoundError: No module named 'vtkmodules'
pyvista is now available for ubuntu from the PPA. If you’ve been using pip to install it, consider now uninstalling the local pip version and use the deb package instead