Python散景导入失败

Python Bokeh Failing to import

我正在尝试通过以下代码使用 Bokeh 查看数据,但 Bokeh 无法导入。我正在使用 jupyter 笔记本。

from bokeh.plotting import figure,show
from bokeh.model import HoverTool

TOOLTIPS = HoverTool(tooltips = [
    ("index", "$index"),
    ("(Wage,Value)", "(@Wage, @Value)"),
    ("Name", "@Name")]
)
p = figure(title="Soccer 2219", x_axis_label='Wage', y_axis_label='Value', plot_width = 700, plot_height = 700, tools=[TOOLTIPS])
p.circle('Wage', 'Value', size = 10, source = df1)
show(p)

错误信息:

ImportError                               Traceback (most recent call last)
<ipython-input-1-c4834377f869> in <module>
      1 from bokeh.plotting import figure,show
----> 2 from bokeh.model import HoverTool
      3 
      4 TOOLTIPS = HoverTool(tooltips = [
      5     ("index", "$index"),

ImportError: cannot import name 'HoverTool' from 'bokeh.model'

你试过检查拼写错误吗?

from bokeh.models import HoverTool