Problem with Fenics and MacOS Catalina

I was just trying to import fenics module but I encountered the following issue.

import fenics
Traceback (most recent call last):
File “”, line 1, in
File “/Users/giulio/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/fenics/init.py”, line 7, in
from dolfin import *
File “/Users/giulio/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/dolfin/init.py”, line 142, in
from .fem.assembling import (assemble, assemble_system, assemble_multimesh,
File “/Users/giulio/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/dolfin/fem/assembling.py”, line 34, in
from dolfin.fem.form import Form
File “/Users/giulio/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/dolfin/fem/form.py”, line 12, in
from dolfin.jit.jit import dolfin_pc, ffc_jit
File “/Users/giulio/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/dolfin/jit/jit.py”, line 18, in
raise RuntimeError(“Could not find DOLFIN pkg-config file. Please make sure appropriate paths are set.”)
RuntimeError: Could not find DOLFIN pkg-config file. Please make sure appropriate paths are set.

Did you resolve this?

I get the same error using macOS 13.6.7 (22G720) and conda 23.9.0.

EDIT:
Running the following command seems to have resolved the error for me (after activating the fenics conda environment):

export PKG_CONFIG_PATH=/Users/philipc/miniconda3/envs/fenics/lib/pkgconfig:$PKG_CONFIG_PATH

where /Users/philipc/miniconda3 is my local conda installation directory.