I’ve installed fenicsx using the following commands
conda create -n fenicsx-env
conda activate fenicsx-env
conda install -c conda-forge fenics-dolfinx mpich pyvista
However, when I go into python (I’ve also tried python3, but that is not part of the anaconda installation) and type
import fenics
I get the error: No module named ‘fenics’.
When typing
conda list
It shows the following fenics modules:
fenics
fenics-basix
fenics-basix-pybind11-abi
fenics-dijitso
fenics-dolfinx
fenics-ffc
fenics-ffcx
fenics-fiat
fenics-libbasix
fenics-libdolfinx
fenics-ufcx
fenics-ufl
On the other hand, I am able to import fenics if I install the legacy fenics using the following commands in the fenicsproject environment:
conda create -n fenicsproject -c conda-forge fenics
source activate fenicsproject
In this environment, typing
conda list
shows the following fenics modules:
fenics
fenics-dijitso
fenics-dolfin
fenics-ffc
fenics-fiat
fenics-libdolfin
fenics-ufl