RuntimeError: Could not find DOLFIN pkg-config file

SOLVED:
it is a bug in anaconda navigator. If you launch a jupyter notebook from within Anaconda navigator it does not load the fenicsproject environment variables, even if you launch the jupyter notebook from the fenicsproject environment.

Whereas if you launch the jupyter notebook from a terminal where you activate the fenicsproject, the problem disappears and everything works fine:
in a terminal simply type
(base) MacBook-Pro-de-Pascal:~ pascalazerad$ conda activate fenicsproject
(fenicsproject) MacBook-Pro-de-Pascal:~ pascalazerad$ jupyter notebook

you can check the environment is loaded by typing in the jupyter notebook

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

executing the line yields:
/anaconda3/envs/fenicsproject/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
fenicsproject path is there

If you had launched the jupyter notebook from anaconda navigator by mouse click you would have gotten
/anaconda3/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
no mention of fenicsproject!