问题
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.
- Remove yarn:
sudo apt-get remove yarn && sudo apt-get purge yarn
- 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
- 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