from pandas_profiling import profile_report
=================================================
ImportError: cannot import name 'escape' from 'jinja2.utils' (/opt/conda/lib/python3.7/site-packages/jinja2/utils.py)
It seems that escape
module was dropped from newer versions of jinja2
. The newer versions of pandas-profiling
use markupsafe
to import escape
module (from markupsafe import escape
). However, your version seems to already use the old import (from jinja2.utils import escape
). You have two options:
pandas-profiling
.jinja2
.The following environment seems to be working:
Jinja2 3.1.1
MarkupSafe 2.0.1
numpy 1.22.3
pandas 1.4.2
pandas-profiling 3.1.0
Check this post, or this github issue for more information.