iPython散景导入错误Row和SizingMode

iPython bokeh import error Row and SizingMode

我跟着这个笔记本用 iPyhton Notebook 尝试散景:https://github.com/bokeh/bokeh/blob/0.12.3/examples/howto/notebook_comms/Basic%20Usage.ipynb

我不知道如何解释和修复这些错误:

错误 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

错误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

散景:0.12.3

龙卷风:4.4.2

python: 2.7

问题是 iPython 笔记本内核不同步。重新启动笔记本服务器是解决方案