I am having a lot of difficulty getting Fenicsx (or rather dolfinx for python) to install and run smoothly (at all).
I am on Ubuntu derived PopOS (22.04) and I would like to install and use fenicsx in a conda environment if at all possible.
I first tried following the instructions from the main fenicsproject.org/download landing page which led me to https://github.com/FEniCS/dolfinx#conda
. However when I try to run any demos from https://github.com/FEniCS/dolfinx/tree/main/python/demo
I get the following error
TypeError: function() argument 'code' must be code, not str
which derives from the following import line
from dolfinx.fem.function import FunctionSpace
Similar issues have been highlighted in these community questions https://fenicsproject.discourse.group/t/error-importing-dolfinx/8158/2
and https://fenicsproject.discourse.group/t/error-importing-dolfinx-using-conda-function-argument-code-must-be-code-not-str/9544
, but there are no clear answers in these.
As an alternative I tried installing it using my package manager using the instructions https://github.com/FEniCS/dolfinx#ubuntu-packages
. When I attempt to run the demo scripts I get the same error.
Does anyone have any suggestion as to how to get this working?
P.S. Apologies for the bodged links - the system restricts me from posting them properly as I am a new user.