Hey everyone,
I’m pretty new to using Bokeh and I’ve run into an issue I can’t seem to solve. I’m trying to create a simple plot, but I keep getting this error:
AttributeError: module ‘bokeh.plotting’ has no attribute ‘show’
Here’s a snippet of my code:
from bokeh.plotting import figure, show
p = figure(title="Simple Line Example")
p.line([1, 2, 3, 4, 5], [6, 7, 8, 9, 10], legend_label="Temp.", line_width=2)
show(p)
I’ve already installed Bokeh using pip install bokeh
, so I’m not sure what the problem is. When I was searching about the error, I came across these resources/articles Installing bokeh. Error message 'module' object has no attribute 'version' how to learn python and as per them I tried the following
I check imports as I am importing show
and figure
correctly from bokeh.plotting
. And it’s something look like this:
from bokeh.plotting import figure, show
I also updated Bokeh.
But still I am getting the same error.
Has anyone else run into this issue? Any ideas on how to fix it?
Thanks in advance for your help
Cheers,
Auro