JuliaGizmos / WebIO.jl

A bridge between Julia and the Web.
https://juliagizmos.github.io/WebIO.jl/latest/
Other
228 stars 64 forks source link

Jupyterlab can't see WebIO extension even though it's installed via pip #509

Open ajwheeler opened 1 year ago

ajwheeler commented 1 year ago

When I install the webio jupyter extension, everything seems to work:

$ python3 -m pip install --force webio_jupyter_extension

Collecting webio_jupyter_extension
  Using cached webio_jupyter_extension-0.1.0-py3-none-any.whl (219 kB)
Installing collected packages: webio_jupyter_extension
  Attempting uninstall: webio_jupyter_extension
    Found existing installation: webio-jupyter-extension 0.1.0
    Uninstalling webio-jupyter-extension-0.1.0:
      Successfully uninstalled webio-jupyter-extension-0.1.0
Successfully installed webio_jupyter_extension-0.1.0

But it doesn't show up in the list of extensions:

$ python3 -m jupyter labextension list
JupyterLab v3.6.1
Other labextensions (built into JupyterLab)
   app dir: /Users/wheeler.883/brew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/share/jupyter/lab
        @axlair/jupyterlab_vim v0.15.1 enabled OK
        jupyterlab-plotly v5.13.0 enabled OK

This isn't an issue with user vs global installs:

$ pip3 show jupyterlab | grep -i location
Location: /Users/wheeler.883/brew/lib/python3.10/site-packages
$ pip3 show webio_jupyter_extension | grep -i location
Location: /Users/wheeler.883/brew/lib/python3.10/site-packages

As far as I've been able to tell, this isn't a duplicate issue. I suspect I'm doing something stupid, but I can't figure out what. Any ideas?

paulnakroshis commented 1 year ago

I have the same issue. WebIO is installed, but I cannot get it to work on julia 1.9.0-rc2

gganapat commented 1 year ago

Same issue here. Even went through the process as mentioned using venv

python3 -m venv venv

. venv/bin/active

pip install notebook jupyterlab webio_jupyter_extension

Locations

pip3 show jupyterlab | grep -i location Location: /Users/gani/Desktop/3c3bc877ab1b5096232586cfbba0ef8b-8b6f0a4221066849f2c54ac28ce422c68796340e/venv/lib/python3.10/site-packages

pip3 show webio_jupyter_extension | grep -i location Location: /Users/gani/Desktop/3c3bc877ab1b5096232586cfbba0ef8b-8b6f0a4221066849f2c54ac28ce422c68796340e/venv/lib/python3.10/site-packages

In Jupyter lab

The WebIO Jupyter extension was not detected. See the WebIO Jupyter integration documentation for more information.

wallscheid commented 1 year ago

Is there any progress in this matter? Facing the same issue using Julia 1.9.3.

jlumpe commented 7 months ago

Same issue with:

I see the following when starting Jupyter lab:

[I 2024-04-17 16:28:39.428 ServerApp] webio_jupyter_extension.serverextension | extension was successfully linked.

which suggests it should be working. I also see

WebIO is registering SystemJS window global.

in the Chrome development console. However I still get the "WebIO not detected" message. It is however working in the "Classic Notebook" view.

jlumpe commented 7 months ago

This might be more relevant in the PlotlyJS-specific issue, but I'm putting it here after my previous comment:

After much trial and error I have figured out how to get this working reliably.

The following creates the conda env for the Jupyter Lab server that works for me:

conda create -n jupyterlab3 python=3.11
conda activate jupyterlab3
pip install 'jupyterlab>=3,<4' 'ipywidgets>=7.6' plotly webio_jupyter_extension

Installing the plotly Python package in the same environment as Jupyter Lab appears to be critical, repeating the same steps without that gives me the "WebIO not detected" message when using PlotlyJS in a Julia kernel.