Testing Bokeh for locally in jupyter notebook

Hello.

I’ve forked Bokeh from Git and now trying to fix the issue I’ve reported in Github.
I managed to complete all steps described in https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html#devguide-setup, I’ve put my changes into code and built local Bokeh.

Now I want to run some tests in Jupyter notebook. I’m running notebook from same conda environment where Bokeh is.

When I’m executing cell
output_notebook()

I’m seeing a warning:

BokehJS 2.0.0-dev.6 successfully loaded.

Warning: Requesting CDN BokehJS version ‘2.0.0dev6’ from Bokeh development version ‘2.0.0dev6-49-gd0f15d435-dirty’. This configuration is unsupported and may not work!

And when I’m running code, no Bokeh chart is being displayed in notebook.

Is there any step not described in Dev. Guide I’m missing?

Try to rebuild BokehJS. If the warning persists, try to remove bokehjs/build and build it again.

But if you built the latest BokehJS and didn’t change any TypeScript code, then that warning doesn’t really affect you. In this case, you’re not seeing a chart for some other reason - check Python and JavaScript logs.

Also a few different ways to make sure to use local BokehJS:

  • Run a local server

    • terminal 1: BOKEH_DEV=true bokeh static
    • terminal 2: BOKEH_RESOURCES=server-dev jupyter-lab

    This will make sure that you always have the most recently built bundles and debugging experience in jlab is the most efficient. Another personal preference is not to use jlab for bokeh development, as it’s usually more trouble than it’s worth.

  • Env var BOKEH_RESOURCES=inline jupyter-lab

  • Programmaticaly:

    output_notebook(resources=INLINE)