holoviews: Error: HoloViews bokeh backend could not be imported

Hi, I just tried to run the examples from the blogpost in jupyter lab. But i´m getting an error right at the beginning:

import numpy as np
import xarray as xr
import pandas as pd
import holoviews as hv
import geoviews as gv
import iris
import cartopy

from cartopy import crs
from cartopy import feature as cf
from geoviews import feature as gf

hv.notebook_extension('bokeh','matplotlib')
%output backend='matplotlib'
%opts Feature [projection=crs.Robinson()]

WARNING:root:notebook_extension: HoloViews bokeh backend could not be imported, ensure bokeh is installed.

but i have installed it:

import bokeh
print("bokeh",bokeh.__version__)
print("holoviews",hv.__version__)
print("geoviews",gv.__version__)

bokeh 0.12.10 holoviews 1.8.4-x-gde78cf33a geoviews 1.3.2

any ideas what icould be wrong?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

As of today, bokeh releases include 2.0.0 and 1.4.0; the former did not work for me whilst the latter did.

Hi, I just tried to run holoviews with bokeh backend and got the same error, but different import issue. WARNING:root:notebook_extension: Holoviews bokeh extension could not be imported, it raised the following exception: ImportError(‘cannot import name ‘Selection’’).

I installed via pip for both holoviews and bokeh, and am trying to use both in jupyter lab.

I installed via pip for both holoviews and bokeh, and am trying to use both in jupyter lab.

What version of holoviews and bokeh did you get?

import bokeh as bk
import holoviews as hv
print(bk.__version__, hv.__version__)

If you’re using JupyterLab you’ll also need the extensions, for holoviews:

jupyter labextension install @pyviz/jupyterlab_holoviews

and if you’re plotting using bokeh directly also:

jupyter labextension install jupyterlab_bokeh

Thanks. pip install bokeh==1.3.4 fixed it for me too.

Updated bokeh and it worked. Note - the bokeh version it 1.3.4.

Running bokeh 1.0.4 and hv 1.11.0 on Windows 10, Py3.7 (Anaconda 2019.03).

These are very old. The current versions are bokeh 1.13.4 and holoviews 1.12.5.

It seems that convert_datetime_array wasn’t added to bokeh until the recent 0.12.14 release but we didn’t pin that version in our 1.9.5 release. The easiest way to fix it will be to upgrade with:

conda install -c bokeh bokeh