Caleb
Caleb

Reputation: 4111

Display holoviews in jupyter in an air-gapped (offline) environment

How should you use Holoviews with a bokeh backend in an air-gapped system (one with no internet access)?

In such cases its possible to get bokeh to still display using inline in a jupyter notebook by putting the following at the top of your notebook:

import bokeh.io
from bokeh.resources import INLINE
bokeh.io.output_notebook(INLINE)

However, these same lines do not seem to enable holoviews with a bokeh back-end to work in the same environment. Holoviews silently fails providing blank outputs. Is there any way to get holoviews with bokeh to work in an elegant way on air-gapped systems?

Upvotes: 1

Views: 32

Answers (1)

Caleb
Caleb

Reputation: 4111

I found the solution. At the start of your notebook you set the inline parameter in your hv.extension call. So, the following will produce a curve as expected:

import holoviews as hv
hv.extension('bokeh',inline=True)

hv.Curve([1,2,3])

As an extra note: there is no need to call bokeh.io.output_notebook(INLINE) if holoviews is setup this way.

Upvotes: 1

Related Questions