Fenics from Conda doesn't import

you can check if the environment is loaded by typing in the python terminal

#test if environment fenics is activated
import os
print(os.environ[‘PATH’])

and check if the environment fenics is present in the path:
you should get something like

/anaconda3/envs/fenicsproject/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin

of course fenicsproject would be replaced by the name you gave to the environment where you did “conda install fenics”

did you “conda activate” the environment from the terminal or from the anaconda navigator GUI (which is apparently bugged) see the post RuntimeError: Could not find DOLFIN pkg-config file

1 Like