我正在尝试从 Metthew Rocklin博客文章中重现第一个示例。
关于如何运行 Bokeh 服务器的描述很全面,但我仍然无法让它工作。我正在使用命令“bokeh serve big_bokeh_test.py --show”在Windows shell上运行以下脚本:
from bokeh.server.server import Server
from bokeh.application import Application
from bokeh.application.handlers.function import FunctionHandler
from bokeh.plotting import figure, ColumnDataSource
def make_document(doc):
fig = figure(title='Line plot!', sizing_mode='scale_width')
fig.line(x=[1, 2, 3], y=[1, 4, 9])
doc.title = "Hello, world!"
doc.add_root(fig)
apps = {'/': Application(FunctionHandler(make_document))}
server = Server(apps, port=5000)
server.start()
Run Code Online (Sandbox Code Playgroud)
没有错误并且服务器正在运行,只是输出是一个空页面。我已经寻找了解决方案。以下链接可能相关,但没有解决我的问题:
我正在使用 Python 3.6.3(64 位)和散景 0.12.9。这是来自 windows shell 的输出:
PS C:\Users\kateryna.smirnova\Documents\IBB\bokeh_graphs> bokeh serve big_bokeh_test.py --show
2017-10-14 10:48:00,231 Starting Bokeh server version …Run Code Online (Sandbox Code Playgroud)