ImportError: cannot import name 'contextfilter' from 'jinja2'

Hi everyone,
I’m trying to run the ‘air_quality’ notebooks (air_quality/1_backfill_feature_groups.ipynb at main · jimdowling/air_quality · GitHub) on my local computer, but I ran into an issue with ‘jinja2’ package when I try to run 'Connecting to Hopsworks Feature Store '.

ImportError: cannot import name ‘contextfilter’ from ‘jinja2’.

Any suggestion about how could I fix that?
I have a Windows machine, jinja2 (3.1.2), nbconvert (6.5.4), and python (3.9.13) installed in my environment.
I also tried some solutions from Google, but nothing is working properly.
Thanks for your time!

Hi @aldosaltao!

The problem is that your environment is using a version of jinja2 that’s newer than what we support. To install a version we support, please run:

pip install jinja2==3.0.3 MarkupSafe==2.0.1

Hope that helps you,

Thanks, Robin! It’s working now. I appreciate your support, cheers!