"legend_label" unexpected attribute error (works in Windows, but not in Ubuntu)

I am running into an issue with the “legend_label” attribute. Curiously enough, it works fine when I run it on my Windows system, but it does not work on my Ubuntu 18.04 system. In both cases I am using Anaconda 4.8.2, and I get the error even when running the sample code in the Bokeh docs

Here is the error:


Traceback (most recent call last):
File “legend_test.py”, line 12, in
p.circle(x, y, legend_label=“sin(x)”)
File “fakesource”, line 5, in circle
File “/home/fsadmin/anaconda3/envs/ghs_env/lib/python3.7/site-packages/bokeh/plotting/helpers.py”, line 857, in func
glyph = _make_glyph(glyphclass, kwargs, glyph_ca)
File “/home/fsadmin/anaconda3/envs/ghs_env/lib/python3.7/site-packages/bokeh/plotting/helpers.py”, line 398, in _make_glyph
return glyphclass(**kws)
File “/home/fsadmin/anaconda3/envs/ghs_env/lib/python3.7/site-packages/bokeh/model.py”, line 307, in init
super(Model, self).init(**kwargs)
File “/home/fsadmin/anaconda3/envs/ghs_env/lib/python3.7/site-packages/bokeh/core/has_props.py”, line 253, in init
setattr(self, name, value)
File “/home/fsadmin/anaconda3/envs/ghs_env/lib/python3.7/site-packages/bokeh/core/has_props.py”, line 288, in setattr
(name, self.class.name, text, nice_join(matches)))
AttributeError: unexpected attribute ‘legend_label’ to Circle, possible attributes are angle, angle_units, fill_alpha, fill_color, js_event_callbacks, js_property_callbacks, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, name, radius, radius_dimension, radius_units, size, subscribed_events, tags, x or y


I have tried update Bokeh from version 1.3.7 to 1.4.0 and now to 2.0.0 but still get the same error. Any suggestions?

When you run your code on Ubuntu, add something like import bokeh; print(bokeh.__version__) at the top of the file and notice what it prints out. Make sure it prints out 2.0.0.

thank you! that was the issue. The version of Bokeh in the conda environment I was trying to run in was not getting updated. I had only updated it in the base environment. Thanks, it was driving me crazy!