Linux Question

No module named objects [bokeh]

I'm trying to run this script:

#Code will be significantly simplified in the 0.4 release
import time
from bokeh.objects import GlyphRenderer
renderer = [r for r in curplot().renderers if isinstance(r, GlyphRenderer)][0]
ds = renderer.data_source
while True:
df =["x"] = x+N*i["y"] = df.rssi
ds._dirty = True


but at this line:

from bokeh.objects import GlyphRenderer

I got:

No module named objects

The version I'm using is


On linux mint 17.1

zmo zmo
Answer Source

did you try installing bokeh before trying the examples? If not, just run:

pip install bokeh

and try your script again.

if it does not work, it's likely that the bokeh sources changed, so you might want to change the

from bokeh.objects import GlyphRenderer


from bokeh.models.renderers import GlyphRenderer

cf the source code

At the first line of your example it states:

#Code will be significantly simplified in the 0.4 release

which means that the example's code was already about to be deprecated at the time of the writing of the tutorial.

So instead of copy/pasting that code, you should try to understand how it works, and recreate it using the documentation and sources:

have fun!