Skip to main content
Skip table of contents

How To: Use Jupyter Bokeh in Data Lab

Overview

If a JavaScript error occurs while attempting to display Bokeh content, it could be due to an error in downloading Bokeh's client library.

To resolve this issue, the solution involves defining the resources as INLINE in the output_notebook() call. By specifying the resources as INLINE, the necessary Bokeh client library will be included directly in the notebook, eliminating any potential errors related to downloading the library.

The subsequent sections provide the code snippet and instructions to implement the solution and ensure the proper display of Bokeh content in Jupyter notebooks.

Solution

To resolve the JavaScript error associated with downloading Bokeh's client library, follow these steps:

  1. Import the necessary module INLINE from bokeh.resources.

  2. Use the output_notebook() function to configure the Bokeh output to be displayed in the Jupyter notebook. Pass the resources parameter and set it to INLINE. This ensures that the required Bokeh client library is included directly in the notebook.

The following code snippet demonstrates the implementation of the solution:

PY
from bokeh.resources import INLINE

output_notebook(resources=INLINE)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.