0
votes

I followed this notebook to try bokeh with iPyhton Notebook: https://github.com/bokeh/bokeh/blob/0.12.3/examples/howto/notebook_comms/Basic%20Usage.ipynb

I dont know how to interpret and fix those errors:

error 1:

from bokeh.io import push_notebook, show, output_notebook
from bokeh.layouts import row
from bokeh.plotting import figure
output_notebook()

ImportError Traceback (most recent call last) in () 3 4 from bokeh.io import push_notebook, show, output_notebook ----> 5 from bokeh.layouts import row 6 from bokeh.plotting import figure 7 output_notebook()

/opt/conda/lib/python2.7/site-packages/bokeh/layouts.py in () 8 from future import absolute_import 9 ---> 10 from .core.enums import Location, SizingMode 11 from .models.tools import ToolbarBox 12 from .models.plots import Plot

ImportError: cannot import name SizingMode

error 2:

from ipywidgets import interact
import numpy as np

from bokeh.io import push_notebook, show, output_notebook
from bokeh.plotting import figure
output_notebook()

ImportError Traceback (most recent call last) in () 6 7 from bokeh.io import push_notebook, show, output_notebook ----> 8 from bokeh.plotting import figure 9 output_notebook()

/opt/conda/lib/python2.7/site-packages/bokeh/plotting/init.py in () 3 4 from ..models import ColumnDataSource; ColumnDataSource ----> 5 from ..models.layouts import Row, Column; Row, Column 6 7 from ..io import curdoc; curdoc

ImportError: cannot import name Row

bokeh : 0.12.3

tornado: 4.4.2

python: 2.7

1
You have an installation problem, or the you have different environments mixed up (i.e. the env with notebook has a different version of bokeh). What is the value of bokeh.__version__ while inside the notebook? - bigreddot
restarting the notebook server solved the version conflict - user670186

1 Answers

1
votes

the problem was that the iPython notebook kernel was out of sync. restarting the notebook server was the solution