bokeh / jupyter_bokeh

An extension for rendering Bokeh content in JupyterLab notebooks
BSD 3-Clause "New" or "Revised" License
253 stars 48 forks source link

Compatibility with jupyterlab 1.0.x #67

Closed hojo0590 closed 4 years ago

hojo0590 commented 5 years ago

Can you please make your extension compatible with the recently released juypterlab 1.0.x ? Currently using your extension with jupyterlab means being downgraded to 0.2.0 which is from a long long time ago. Sadly there is no labextension install --force to use the newest version nevertheless (or I did not find it). Thanks in advance :)

jeiche commented 5 years ago

For me, Bokeh seems to be rendering natively on JupyterLab 1.0.x without the jupyterlab_bokeh extension.

bryevdv commented 5 years ago

A preliminary PR has been merged and also a version published as 1.0.0next on NPM. I am not entirely sure how to install that to Jupyter Lab, but I am told it is possible. The reason it is "next" is because there are still some possible issues to sort out with push_notebook and embedded Bokeh server apps.

dmpe commented 5 years ago

I think this is related....A lot of plugins depend on this package and I think they are now failing to install...Or maybe you know more if it is related...?

error Couldn't find package "@jupyterlab/application@^1.0.0" required by "jupyterlab_bokeh@file:../extensions/jupyterlab_bokeh-1.0.0.tgz" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "@jupyterlab/docregistry@^1.0.0" required by "jupyterlab_bokeh@file:../extensions/jupyterlab_bokeh-1.0.0.tgz" on the "npm" registry.
    at /opt/conda/share/jupyter/lab/staging/yarn.js:37186:17
    at Generator.throw (<anonymous>)
    at step (/opt/conda/share/jupyter/lab/staging/yarn.js:310:30)
    at /opt/conda/share/jupyter/lab/staging/yarn.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
Error: Couldn't find package "@jupyterlab/services@^4.0.0" required by "jupyterlab_bokeh@file:../extensions/jupyterlab_bokeh-1.0.0.tgz" on the "npm" registry.
    at /opt/conda/share/jupyter/lab/staging/yarn.js:37186:17
    at Generator.throw (<anonymous>)
    at step (/opt/conda/share/jupyter/lab/staging/yarn.js:310:30)
    at /opt/conda/share/jupyter/lab/staging/yarn.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
Error: Couldn't find package "@phosphor/widgets@^1.6.0" required by "jupyterlab_bokeh@file:../extensions/jupyterlab_bokeh-1.0.0.tgz" on the "npm" registry.
    at /opt/conda/share/jupyter/lab/staging/yarn.js:37186:17
    at Generator.throw (<anonymous>)
    at step (/opt/conda/share/jupyter/lab/staging/yarn.js:310:30)
    at /opt/conda/share/jupyter/lab/staging/yarn.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
Error: Couldn't find package "@jupyterlab/notebook@^1.0.0" required by "jupyterlab_bokeh@file:../extensions/jupyterlab_bokeh-1.0.0.tgz" on the "npm" registry.
    at /opt/conda/share/jupyter/lab/staging/yarn.js:37186:17
    at Generator.throw (<anonymous>)
    at step (/opt/conda/share/jupyter/lab/staging/yarn.js:310:30)
    at /opt/conda/share/jupyter/lab/staging/yarn.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
Error: Couldn't find package "@phosphor/disposable@^1.1.2" required by "jupyterlab_bokeh@file:../extensions/jupyterlab_bokeh-1.0.0.tgz" on the "npm" registry.
    at /opt/conda/share/jupyter/lab/staging/yarn.js:37186:17
    at Generator.throw (<anonymous>)
    at step (/opt/conda/share/jupyter/lab/staging/yarn.js:310:30)
    at /opt/conda/share/jupyter/lab/staging/yarn.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
Error: Couldn't find package "@jupyterlab/apputils@^1.0.0" required by "jupyterlab_bokeh@file:../extensions/jupyterlab_bokeh-1.0.0.tgz" on the "npm" registry.
    at /opt/conda/share/jupyter/lab/staging/yarn.js:37186:17
    at Generator.throw (<anonymous>)
    at step (/opt/conda/share/jupyter/lab/staging/yarn.js:310:30)
    at /opt/conda/share/jupyter/lab/staging/yarn.js:323:13
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
bryevdv commented 5 years ago

A lot of plugins depend on this package and I think they are now failing to instal

@dmpe That seems like a new upstream problem then? Our 1.0next version was working (mostly) when it was published last month.

cc @canavandl

dmpe commented 5 years ago

Ok, this may be as well. Thanks for info

b-trav commented 5 years ago

I am also having issues with jupyterlab_bokeh. The plot in Jupyter Interactors displays, but the interactors just give

<function __main__.update(f, w=1, A=1, phi=0)>

When I run

jupyter labextension install jupyterlab_bokeh

I get

Building jupyterlab assets

and the jupyterlab_bokeh extension shows in my gui list of extensions in JupyterLab, but

conda list |grep jupyter

gives

# packages in environment at /home/username/anaconda3/envs/jupyterlab:
jupyter-http-over-ws      0.0.6                    pypi_0    pypi
jupyter_client            5.3.1                      py_0  
jupyter_contrib_core      0.3.3                      py_2    conda-forge
jupyter_core              4.5.0                      py_0  
jupyter_nbextensions_configurator 0.4.1                    py37_0    conda-forge
jupyterlab                1.0.2            py37hf63ae98_0  
jupyterlab-git            0.8                        py_0    conda-forge
jupyterlab-latex          1.0.0                    pypi_0    pypi
jupyterlab_server         1.0.0                      py_0  

I'm using Bokeh 1.3.1. The interactor widgets display in Jupyter (Classic Notebook), but they do not work. It would be great to see these work in JupyterLab. Thanks.

bryevdv commented 5 years ago

@b-trav there is a separate ipywidgets jupyterlab extension (not produced by and unrelated to bokeh at all) that you will need to install for jupyter interactors to function.

b-trav commented 5 years ago

@bryevdv, thanks for the prompt reply. Once I installed that extension using:

jupyter labextension install @jupyter-widgets/jupyterlab-manager

I could see the interactor, but it still didn't work. It turns out the reason for this was I installed jupyterlab using the command:

conda create -n jupyterlab jupyterlab

Which, unfortunately does not install everything required for Jupyter, so I was getting these errors:

[IPKernelApp] WARNING | No such comm: 678f770d7b254e01b8f641749a749fb8

whenever I moved a widget slider. This was fixed by running the following command:

conda install -c conda-forge jupyter

Hope this helps anybody else who runs into this issue on jupyterlab, and thanks for the great work with Bokeh.

AKuederle commented 4 years ago

Is the current version of jupyter_bokeh supposed to work with JupyterLab 1.0.x? I still get errors/warnings with regards to push_notebook in the console.

bryevdv commented 4 years ago

How did you install? There were some recent changes that are currently only published in "dev" docs (and also the README in this repo). This is how to install the latest version:

jupyter labextension install @bokeh/jupyter_bokeh

I just tested again locally with JupyterLab 1.2.4 and it's working as expected:

Screen Shot 2020-02-17 at 10 38 38 AM

If you are still experiencing a problem please open a new issue, but make sure to include complete details about your local system and steps to repro.