Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bokeh 1.4.0 breaking with jinja version more than 3.0.1 #8

Closed
Toefinder opened this issue Dec 27, 2022 · 2 comments
Closed

bokeh 1.4.0 breaking with jinja version more than 3.0.1 #8

Toefinder opened this issue Dec 27, 2022 · 2 comments

Comments

@Toefinder
Copy link

Toefinder commented Dec 27, 2022

bokeh 1.4.0 specifies jinja2>=2.7. Creating conda env gives me 3.1.2 which is the latest version. However, running from bokeh.plotting import figure as bokeh_figure in the notebook gives this error:

File "/home/<redacted>/miniconda3/envs/cosypose/lib/python3.7/site-packages/bokeh/core/templates.py", line 43, in <module>
from jinja2 import Environment, Markup, FileSystemLoader
ImportError: cannot import name 'Markup' from 'jinja2'

Found the error through https://stackoverflow.com/questions/71645272/importerror-cannot-import-name-markup-from-jinja2
Version starts breaking from jinja2==3.0.1

I tested with 3.0.0 and it worked.
Tested with 2.7 gave another error

from markupsafe import Markup, escape, soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/anh/miniconda3/envs/cosypose/lib/python3.7/site-packages/markupsafe/__init__.py)

Shall we explicitly specify the jinja2 version in environment.yaml file?

@KushnirDmytro
Copy link

That is a good proposal. Thank you, @Toefinder!
I just recently had to redeploy this repository and found myself without notes about how I fixed the configuration the last time 😅

By the way, adding the seaborn to dependencies would help run notebooks out of the box 😉

@Toefinder
Copy link
Author

Closing this as it has been resolved in #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants