Closed cpsievert closed 2 months ago
This error usually comes up with widgets if you %pip
or !pip
install anywidget for the first time in a running jupyter environment. Please try shutting down the Jupyter server and restarting (not just restarting the kernel).
The anywidget python package removes this issue for all other anywidgets, but it's still a limitation of Jupyter Widgets that traditional widgets aren't installed from the kernel.
Hard to know for sure if this is the issue (expanding the Error: Script error for "anywidget"
might provide more context). If restarting the server doesn't work, a minimal reproducible example for 1.) creating your Python env and 2.) starting Jupyter would be necessary to debug on my end.
I still get the same error after shutting down the server -- maybe it's because I have an old version of the notebook?
$ jupyter notebook --version
6.5.2
Good news though -- it does work with JupyterLab:
$ jupyter lab --version
3.5.3
And also the Python kernel that I'm using is 3.12.
Oh interesting, thanks for sharing. I'll have a look.
Can you share how you made the Python environment ~and the version of Python~? I'm not able to reproduce.
❯ jupyter --version
IPython : 8.18.1
ipykernel : 6.29.5
ipywidgets : 8.1.3
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : not installed
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
++ notebook : 6.5.2
qtconsole : not installed
traitlets : 5.9.0
Closing as I haven't been able to reproduce. Please let me know if after creating a fresh environment you still have troubles!
Cool package! I was eager to see how it works with Shiny via shinywidgets, but it seems something in my Python environment is off. I get the following JS error when trying to render the
Widget
in Jupyter:And here is more info about that error:
Happy to offer any more information you think might be relevant (or even pair on it, if you'd like)