Simple-Robotics / cosypose

Code for "CosyPose: Consistent multi-view multi-object 6D pose estimation", ECCV 2020.
MIT License
69 stars 15 forks source link

bokeh 1.4.0 breaking with jinja version more than 3.0.1 #8

Closed Toefinder closed 1 year ago

Toefinder commented 1 year ago

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 commented 1 year ago

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 :sweat_smile:

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

Toefinder commented 1 year ago

Closing this as it has been resolved in #7