from bokeh.plotting import figure, show, output_notebook
from bokeh.sampledata.iris import flowers
colormap = {'setosa': 'red', 'versicolor': 'green', 'virginica': 'blue'}
colors = [colormap[x] for x in flowers['species']]
p = figure(title = "Iris Morphology")
p.xaxis.axis_label = 'Petal Length'
p.yaxis.axis_label = 'Petal Width'
p.circle(flowers["petal_length"], flowers["petal_width"],
color=colors, fill_alpha=0.2, size=10)
output_notebook()
show(p)
ImportError Traceback (most recent call last)
<ipython-input-17-c50d1a94007e> in <module>()
13
14 output_notebook()
---> 15 show(p)
/home/nbuser/env3/lib/python3.4/site-packages/bokeh/io.py in show(obj, browser, new)
299
300 '''
--> 301 return _show_with_state(obj, _state, browser, new)
302
303 def _show_with_state(obj, state, browser, new):
/home/nbuser/env3/lib/python3.4/site-packages/bokeh/io.py in _show_with_state(obj, state, browser, new)
307
308 if state.notebook:
--> 309 comms_handle = _show_notebook_with_state(obj, state)
310
311 elif state.server_enabled:
/home/nbuser/env3/lib/python3.4/site-packages/bokeh/io.py in _show_notebook_with_state(obj, state)
329 comms_target = make_id()
330 publish_display_data({'text/html': notebook_div(obj, comms_target)})
--> 331 handle = _CommsHandle(get_comms(comms_target), state.document, state.document.to_json())
332 state.last_comms_handle = handle
333 return handle
/home/nbuser/env3/lib/python3.4/site-packages/bokeh/util/notebook.py in get_comms(target_name)
109
110 '''
--> 111 from ipykernel.comm import Comm
112 return Comm(target_name=target_name, data={})
113
ImportError: No module named 'ipykernel'
In [16]: