Holoviews plot not rendered in cell in JupyterLab

岁酱吖の 提交于 2019-12-08 03:15:36

问题


I recently tried running the 1-Introduction.ipynb notebook in holoviews-examples in jupyterlab 0.32.1 with bokeh 0.12.16, holoviews 1.10.7 and jupyterlab_pyviz 0.5.2 installed. The plots don't seem to be rendered in a cell, however; moreover, I can't move the plot around or delete it (see the below example for when I run the first cell in the notebook containing a scatter plot):

Any thoughts as to what could be causing this? I don't have this problem if I use bokeh directly.


回答1:


Per philippjfr, the presence of the beakerx-jupyterlab extension was interfering with holoviews; disabling the former fixed the problem.




回答2:


I'm on WSL Linux (Ubuntu) and had the same issue, with newest dependencies installed (conda-forge):

What did the trick for me was uninstall yarn, reinstall yarn and then let jupyter lab rebuild the extension. Then the overlapping bokeh/holoviews graphics disappeared.

  1. Remove yarn:
sudo apt-get remove yarn && sudo apt-get purge yarn
  1. Install yarn:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
  1. Start jupyter lab & click yes when requested to building pyviz extension.



回答3:


with JupyterLab 1.x I had as well the issue that all processes of bokeh/holoviews run to create an interactive plot [with box_selection] but to see it rendered so that it could be used interactively, I had to update the following:

jupyter labextension install jupyterlab_bokeh
jupyter labextension install @pyviz/jupyterlab_pyviz


来源:https://stackoverflow.com/questions/51351467/holoviews-plot-not-rendered-in-cell-in-jupyterlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!