错误原因:应该是jinja2版本不匹配,尝试改为3.0.3版本,测试通过。 pip install jinja2==3.0.3 参考: jupyter notebook 报错ImportError: cannot import name ‘contextfilter‘ from ‘jinja2‘