Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 5250  / 1 Year ago, sat, january 28, 2023, 5:31:35

I am running Xubuntu 20.04 (after upgrading from 19.04) as a guest on a VirtualBox VM in a Windows 10 host. After an apt install of the jupyter metapackage, I keep getting two errors. To reproduce them, I created a Python3 notebook with the following cells:



[1] import ipywidgets as widgets
[2] widgets.__version__
[3] widgets.IntSlider()


On running cell 1 or on re-opening the notebook the following appears in the terminal where I invoked jupyter notebook:



[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version


Cells 1 & 2 run fine. Cell 3 creates the widget and the widget seems to operate fine but the notebook and the jupyter notebook terminal show:



[IPKernelApp] WARNING | Widget Javascript not detected.  It may not be installed or enabled properly.


pip3 list (showing only relevant elements) results in:



jupyter-client               6.1.2         
jupyter-console 6.0.0
jupyter-core 4.6.3
ipykernel 5.2.0
ipython 7.13.0
ipython-genutils 0.2.0
ipywidgets 6.0.0
nbconvert 5.6.1
nbformat 5.0.4
notebook 6.0.3


jupyter nbextension list shows:



  config dir: /home/marvin/.jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: OK


and after I tried: jupyter nbextension enable --py widgetsnbextension, the following was added:



  config dir: /etc/jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: OK


What is the best way of tracking down the problem? Or would I be better off doing one of the following:




  1. re-installing via apt

  2. re-installing via pip3

  3. installing anaconda and re-installing via conda?



Many thanks



Marv


More From » xubuntu

 Answers
7

I found a workaround and so am answering my own question...



I suspect the problem was that conflicting versions of jupyter-core were installed but I cannot prove this assertion, even when I asked the same question on Launchpad.



My solution was to uninstall all the pip3 and apt components and to delete my local configuration files. Next I installed MiniConda and created appropriate environments for my purposes using Conda. Now everything works perfectly.



(BTW: When using Conda, I recomment using separate environments for each project. If something goes wrong, it is easy to delete and start again and there seems to be less chance of conflicting binary files.)



Marv


[#3488] Monday, January 30, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
irtuallyefu

Total Points: 429
Total Questions: 97
Total Answers: 119

Location: Hong Kong
Member since Tue, Oct 19, 2021
3 Years ago
irtuallyefu questions
Wed, Apr 19, 23, 14:25, 1 Year ago
Fri, Jul 9, 21, 19:52, 3 Years ago
Tue, Oct 5, 21, 15:07, 3 Years ago
;