Anaconda Installation of Fenics

I am totally new to this…

I installed FEniCS according to the following

conda create -n fenicsproject -c conda-forge fenics
source activate fenicsproject

Got it to work on spyder with instructions from the following site

Fixed the matplotlib problem by adding the package into the fenicsproject environment on the Anaconda-Navigator

Added mshr by the following
conda config --add channels conda-forge
conda install mshr

When I run the following in a spyder console, I got the following error

File “”, line 1, in
from mshr import *

File “/Users/collin/opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/mshr/init.py”, line 24, in
from .cpp import Circle

ImportError: generic_type: type “CSGGeometry” referenced unknown base type “dolfin::Variable”

What do I need to do to fix it?

Thanks

Maybe have a look at: Anaconda Installation of Fenics and Mshr

I have the following (FEniCS 2019 with slepc 3.12)

packages in environment at /Users/collin/opt/anaconda3/envs/fenicsproject:

Name Version Build Channel

fenics 2019.1.0 py38h32f6830_10 conda-forge
fenics-dijitso 2019.1.0 py_10 conda-forge
fenics-dolfin 2019.1.0 py38h1933a79_10 conda-forge
fenics-ffc 2019.1.0 py_10 conda-forge
fenics-fiat 2019.1.0 py_10 conda-forge
fenics-libdolfin 2019.1.0 ha574790_10 conda-forge
fenics-ufl 2019.1.0 py_10 conda-forge

packages in environment at /Users/collin/opt/anaconda3/envs/fenicsproject:

Name Version Build Channel

slepc 3.12.2 hefb7033_0 conda-forge
slepc4py 3.12.0 py38h00bfe04_1 conda-forge

Consider using Docker image of fenics. It’s more reliable since “Anaconda recipes are maintained by the community”, easy to install and to manage releases. But you might spend some time on learning basic concepts of docker.

I would recommend using Gmsh + pygmsh instead of mshr which is not maintained actively. See Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio - #79 by dokken and a lot of other examples therein to use gmsh/pygmsh + meshio to generate and load compatible meshes