Holoviews: Bokeh 2.0.0 Compatibility

Created on 11 Mar 2020  路  1Comment  路  Source: holoviz/holoviews

According to the release notes of Bokeh 2.0.0:

bokeh.plotting.helpers Entire module removed

Yet, Holoviews seems to try to use bokeh.plotting.helpers during _load_bokeh (see logs below)

According to, Holoviews 1.12.7 is the latest version on conda-forge. Is Holoviews 1.12.7 incompatible to Bokeh 2.0.0?

ALL software version info

The following packages are installed in my conda environment, from channel conda-forge woth flag --strict

package | version
Shapely | 1.7.0
pyproj | 2.5.0
pandas | 1.0.1
numpy | 1.18.1
matplotlib | 3.2.0
mapclassify | 2.2.0
jupyterlab | 2.0.1
ipython | 7.13.0
holoviews | 1.12.7
geoviews | 1.6.6
geopandas | 0.7.0
Fiona | 1.8.13
cloudpickle | 1.3.0
Cartopy | 0.17.0
bokeh | 2.0.0

Description of expected behavior and the observed behavior

hv.notebook_extension('bokeh') should not raise an error

Complete, minimal, self-contained example code that reproduces the issue

Create an env in conda:

conda create -n holo_env python=3.7 -c conda-forge
conda activate holo_env
conda config --env --set channel_priority strict
conda config --show channel_priority # verify
conda install -c conda-forge geopandas fiona jupyterlab geoviews holoviews nbconvert descartes numpy mapclassify

Then, in jupyter lab:

import holoviews as hv
hv.notebook_extension('bokeh')

If I revert to the previous revision of the environment (with bokeh=1.4.0), the above does not raise an error, e.g.:

conda install --revision 5 -c conda-forge

.. where 5 is the environment rev number where bokeh=1.4.0. It is the same as if creating the above env with

conda install -c conda-forge geopandas fiona jupyterlab geoviews holoviews nbconvert descartes numpy mapclassify bokeh=1.4.0 -n holo_env

Stack traceback and/or browser JavaScript console output

WARNING:param.notebook_extension: Holoviews bokeh extension could not be imported, it raised the following exception: ModuleNotFoundError('No module named 'bokeh.plotting.helpers'')
WARNING:param.notebook_extension: bokeh backend hook <function _load_bokeh at 0x7f9f63b4f7a0> failed with following exception: No module named 'bokeh.plotting.helpers'
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-4d21d4bcd86d> in <module>
     26 import shapely.speedups as speedups
     27 speedups.enable()
---> 28 hv.notebook_extension('bokeh')

~/miniconda3/envs/jupyter_env_strict/lib/python3.7/site-packages/param/parameterized.py in __new__(class_, *args, **params)
   2810         inst = class_.instance()
   2811         inst.param._set_name(class_.__name__)
-> 2812         return inst.__call__(*args,**params)
   2813 
   2814     def __call__(self,*args,**kw):

~/miniconda3/envs/jupyter_env_strict/lib/python3.7/site-packages/holoviews/ipython/__init__.py in __call__(self, *args, **params)
    114 
    115     def __call__(self, *args, **params):
--> 116         super(notebook_extension, self).__call__(*args, **params)
    117         # Abort if IPython not found
    118         try:

~/miniconda3/envs/jupyter_env_strict/lib/python3.7/site-packages/holoviews/util/__init__.py in __call__(self, *args, **params)
    708 
    709         if selected_backend is None:
--> 710             raise ImportError('None of the backends could be imported')
    711         Store.set_current_backend(selected_backend)
    712 

ImportError: None of the backends could be imported

Screenshots or screencasts of the bug in action

image

Most helpful comment

This has already been merged and will be in the 1.13.0 release.

>All comments

This has already been merged and will be in the 1.13.0 release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelaye picture michaelaye  路  3Comments

Forander picture Forander  路  6Comments

nbren12 picture nbren12  路  5Comments

ahuang11 picture ahuang11  路  3Comments

ahuang11 picture ahuang11  路  5Comments