JuliaGizmos / Interact.jl

Interactive widgets to play with your Julia code
Other
522 stars 77 forks source link

Doesn't seem to work in JupyterLab 3.1.7 #415

Open dalum opened 2 years ago

dalum commented 2 years ago

Hi!

I'm having some issues with Interact for notebooks running inside JupyterLab. This may be a WebIO issue, but opening it here as this package is the entrypoint. Essentially, in this simple example:

using Interact

s = slider(0:.1:1,label="Slider X:")
display(s)
display(observe(s));

the observable below the slider does not update on slider changes. Same goes for binding of all other widgets, which makes for a very non-interactive experience, unfortunately :cry:

I tried to follow the installation instructions, which seem a bit outdated and has a few redirections, but seemed to boil down to just installing the WebIO extension using:

$ python3 -m pip install --upgrade webio_jupyter_extension

From the troubleshooting guide in WebIO, the extension does appear to be correctly installed, as I get

$ jupyter labextension list
JupyterLab v3.1.7
<...>/miniconda3/share/jupyter/labextensions
        ...
        webio-jupyterlab-provider v0.1.0 enabled OK (python, webio_jupyter_extension)
        ...

and it also shows up in the Jupyter Lab UI as installed. I have also restarted Jupyter Lab several times after installation. Relevant to this issue, I am using the following package versions:

  [7073ff75] IJulia v1.23.2
  [c601a237] Interact v0.10.4
  [0f1e0344] WebIO v0.8.17

and everything is running inside a docker based on Ubuntu 20.04, so there should be nothing particularly fancy about the system that it runs on.

The problem only exists in Jupyter Lab, as a similar page hosted with Mux works just fine.

Am I missing something in the installation or setup for this to work in Jupyter Lab or is it currently broken?

vegaf1 commented 2 years ago

I also had issues with WebIO, however it was resolved when I created a local environment for the tutorials. In this local environment I only have the following packages and the tutorial is working now. [c601a237] Interact v0.10.4 [0f1e0344] WebIO v0.8.18 [44cfe95a] Pkg

TimSlendebroek commented 1 year ago

I have a similar issue running your code @dalum, @vegaf1 with local environment you mean creating a new notebook (as this works for me)? I have many packages on top of Interact and WebIO (so this doesn't seem to cause the problem) image