I have installed cfgrib on my macOs by doing the following
python3.8 -m pip install cfgrib
Now if I open try to import cfgrib
import cfgrib
I get
RuntimeError: ecCodes library not found using ['eccodes', 'libeccodes.so', 'libeccodes']
I solved it by installing cfgrib via homebrew.
brew install eccodes