Closed AnirudhDagar closed 2 years ago
Fixed in #47
solved the issue by matching jinja2 version and nb convert as follows jinja2==3.0.3 nbconvert==6.4.4
solved the issue by matching jinja2 version and nb convert as follows jinja2==3.0.3 nbconvert==6.4.4
it works! and a tip: 'pip' or 'conda' these two packages in 'base' env!! Because if you look in the error log, you will find the py script which jupyter app launched locate in the base env. That means the problem appeared here is not related to the virtual environment you created,but related to the base env or maybe the jupyter itself.
通过匹配 jinja2 版本和 nb convert 解决了该问题,如下所示 jinja2==3.0.3 nbconvert==6.4.4
thank you very much,I was going to try last time, but it work
nbconvert is pinned to version 5.6.1 in d2lbook. This older version doesn't include this fix for the earlier deprecated (and recently completely remove functions in jinja2).
Hence recently when the latest version (v3.1.0) of jinja2 was released on Mar 24, 2022, we started to get the following import error because of the removed functions like contextfilter.
To fix this issue either we can pin jinja2 to 3.0 (which may not be the best idea) or we can unpin nbconvert and use the latest version which already handles the fix for removed functions.