Can't deploy streamlit app with Bokeh module


I have been using Bokeh for creating visualizations on my app. The app used to run with no problem. However, it broke few days ago and rebooting it didn’t work out as well. I figured the problem comes from importing Bokeh. I receive the following error:

ImportError: cannot import name ‘Markup’ from ‘jinja2’ (/home/appuser/venv/lib/python3.7/site-packages/jinja2/

Jinja2 is one of Bokeh’s dependencies.

Here is a simplified version of the problem:

The following is simple streamlit app with one Bokeh plot in it:

import streamlit as st
from bokeh.plotting import figure

graph = figure(title = “Bokeh Line Graph”)

x = [1, 2, 3, 4, 5]
y = [5, 4, 3, 2, 1]

graph.line(x, y)



I can’t deploy the above app. Does anyone know how to fix this?

Thank you,

Which version of bokeh and jinja2 are you using?

On my Mac, I have the following:

Jinja2 2.11.2
Bokeh 2.2.3

When deploying the app, I don’t include Jinja2 in the requirements.text file. It used to work fine in the past, but not anymore.