-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken ipywidgets interactivity in the Lorenz demo #54
Comments
Thanks @pierre-haessig for the report. Also linking to jupyterlite/jupyterlite#1465 which looks related. |
Wondering if this could be related to an ipywidgets release made this summer, which broke the use of |
Same symptoms indeed. Now that there a bug report for every jupyterlite-related repo! |
Good question! Then only think I'm sure of is that ipywidgets still works in non jupyterlite environment. |
Maybe it could be worth trying with |
Good idea, but since pyodide bundles many packages in its distribution, is it just enough to change ipywidgets in requirements.txt? That is changing requirements to:
By the way, in try-jupyter, despite the fact it derives from jupyterlite/demo, I don't find |
Yes, and maybe we can also try pinning
Right, it's also fine to install dependencies in the build environment with conda / mamba, using an |
but I don't see |
Right, it's a dependency of |
Do you mean that the version pinning should be done at the pip install stage with
(along with |
I meant pinning |
to explore the cause of jupyter/try-jupyter#54
OK, this is what I put in the requirements: https://github.com/pierre-haessig/pierre-notebooks/blob/main/requirements.txt and here is the result: https://pierre-haessig.github.io/pierre-notebooks/lab/index.html?path=Frequency+regulation+nocode.ipynb I rushed the test, so perhaps I missed something (normally I cleared browser cache, but sometimes...). Also, what I don't understand is that import ipywidgets
ipywidgets.__version__ report '8.1.5' despite https://github.com/pierre-haessig/pierre-notebooks/blob/main/requirements.txt |
If you need a workaround: Going back to Jupyterlite 0.3.0 made my interactive scripts work again. Some modules need to be installed on build side and on runtime side (see https://jupyterlite.readthedocs.io/en/stable/howto/configure/simple_extensions.html), which might result in different verions. As there is anonther issue with broken paths for widgetsnbextension (see jupyterlite/jupyterlite#1342), I added a requirements.txt on runtime side as well ("runtime-requirements.txt"), and use it to install the missing modules on runtime, without the need to adapt all scripts when something is changing again. See https://bdcodebase.github.io/JLdeployments/lab/index.html?path=DFT.ipynb for a (at least currently) working example. |
This is a cross-post of the jupyterlite/pyodide-kernel#133 issue filed in the pyodide-kernel repo, to serve as a placeholder.
The specific symptom for try-jupyter is that the interactivity of the Lorenz attractor demo is broken. There is some strange/erratic behavior of
ipywidgets
inside JupyterLite which seemingly appeared this summer 2024.The text was updated successfully, but these errors were encountered: