-
Notifications
You must be signed in to change notification settings - Fork 946
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
ipywidgets don't work on virtualenv #2257
Comments
Exact same problem here on Arch linux with
Error message: |
@Cbhihe - can you list all of the python packages you have installed and their version numbers? In particular, ipywidgets, notebook, jupyterlab. Can you post exactly the error message you see? |
After a Jupyter Notebook routine upgrade, the IPKernelApp error and warning remain. Whether I use
When using the new
|
I am encountering this error in a fresh install of Ubuntu 22.04 LTS. I have installed Python 3.10.4 from source +
Here is the error:
Here is the list of installed packages:
So that we're comparing apples to apples, start a DigitalOcean droplet 20.04 LTS. Then run the following commands from my history.
Error
|
This issue is appearing elsewhere in other bug trackers: https://bbs.archlinux.org/viewtopic.php?id=274933 Also here: And here: A package changed on or around March 17th: https://www.google.com/search?q=%22No+such+comm+target+registered%3A+jupyter.widget.control%22 |
What is happening when you see this error is most likely the following:
I believe the kernel comm protocol is lacking an extra message for the front-end to request "which are the comm targets that are registered". There is a JEP open for that purpose: jupyter/enhancement-proposals#86 TLTR: This error should not cause any rendering issue on the widget. If you see widgets working, you can simply ignore the error for now. If you don't see the widgets working, this is most likely another issue that is happening. |
Tx, utkonos and martin. |
The gist of @martinRenou's message is that this particular message is logged as an error, but actually is harmless, and should really be classified as an informational message. @martinRenou points out that we have other proposals open in Jupyter to correct the actual problem (that this pattern shows an error message, but actually should not signal an error), rather than preventing the message. |
dou you fix it? |
Is someone fixing this, or... we wait a few more years? |
Since ipywidgets nominally works in venv environments, likely this is a problem with the specific installation and older packages that had been installed, etc. My shot-in-the-dark guess is that this is a problem with the interaction between user-level and environment-level paths in Jupyter, combined with old packages being installed at the user level. We recently addressed a situation where ipywidgets installed in a venv was broken over in #3559. The solution there was to (a) delete old ipywidgets packages in ~/.local/jupyter, and (b) set the For whoever is having this problem: can you (a) don't use
Please be kind. I think that comment was unnecessarily sarcastic. |
I am still seeing these two:
I have removed the step during the install process for #!/bin/bash
## Set environment
export DEBIAN_FRONTEND=noninteractive
## Update Ubuntu
sleep 20
echo 'APT::Get::Always-Include-Phased-Updates "1";' | tee /etc/apt/apt.conf.d/80PhasedUpdates
apt-get update
apt-get --with-new-pkgs upgrade -y
apt-get autoremove -y
apt-get autoclean -y
## Configure tmux
echo 'set -g default-terminal "tmux-256color"' | tee /etc/tmux.conf
## Install Python
dpkg -i /data/python3.10_3.10.6-1_amd64.deb
## Install Jupyter
apt-get install -y jq
sudo -i -u vagrant bash << EOF
python3.10 -m venv /home/vagrant/venv
source /home/vagrant/venv/bin/activate
pip list -o --format json | jq -r '.[].name' | xargs -n 1 pip install -U
pip install wheel
pip install jupyterlab ipywidgets
EOF
## Reboot
reboot Here is the output from the other commands:
For completeness, so anyone can verify the above, here is my # -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/jammy64'
config.vm.synced_folder 'data', '/data'
config.vm.provider 'virtualbox' do |vb|
vb.gui = false
vb.memory = '32768'
vb.cpus = '6'
end
config.vm.provision 'shell', path: 'install.sh'
end |
This error is accompanied for me with a |
I can confirm the error in a conda env on Ubuntu 20.04 and Windows 10, only that sometimes no error shows up - neither in Jupyter Lab directly nor in the browser console. The cell gets executed but nothing is showing up. The tiny blue side bar below the cell indicates however that something has happened: After a while I discovered a weird Jupyter bug:
Hence, I only work with one notebook at the moment. If anyone is interested in replication: |
Just checking in here. With a fresh install, this error and warning are still happening.
|
the error still happen
|
I have the same problem, is there a solution? [IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control |
I suffered the same difficulty as you!same error and kernel died!/crying |
Closing as answered.
is not an error, it's only a warning, and it cannot be a reason for the kernel to die. If your kernel is dying, it's due to something else. |
It's been said multiple times that this is harmless, but (at least for me) it is not.
I am using PyCharm, Ubuntu 22, both freshly installed. |
@AzimAhmadzadeh Can you tell us which ipykernel version you have? Please make sure to have the very latest, the recent ipykernel versions had issues with ipywidgets |
@martinRenou Uninstalling Regarding your question: I am using And here are other related libraries that are automatically installed:
|
What did you see when uninstalling |
Yes. The problem remains to be
|
You did not mention a
This "error" (I'm going to insist putting quotes, it's just a warning 😅) comes from |
That's the error python gives you when it does not find your imported module. That's why I've been saying that this is not "harmless". I created a new project and tried to reproduced the issue with mock modules. I could not. Probably the issue lies somewhere else but the |
I would like to +1 for this issue and request it be opened again:
|
I know what a There have been multiple broken ipykernel releases recently, please make sure to update to the latest ipykernel ( |
No need to be condescending. You asked "what is it?" Also, I was trying to explain that I implicitly mentioned this error in my previous comment. Regarding the compiler error, there was no trackback; it was a single import that failed and a single line of error. Unfortunately, since I resolved my issue (see below) I do not have the Jupyter-server's log to report, but it was similar to what @poxlox reported. I found the issue in my case: In my case, it was related to the new version of PyCharm 22.3 (stable/latest), which currently has issues with notebooks (https://youtrack.jetbrains.com/issue/PY-57823). I could not reproduce this error in a fresh project, but as soon as I switched back to PyCharm 22.2.4 all modules were found as expected. |
Happy you could find your issue! I'm locking this conversation. To anyone reading this, if you think you have a similar issue, please open a separate one with your specific setup. |
Hello all,
When i start jupyter i have the next msg
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
and nothing happen when i try use ipywidgets in my jupyter-notebookThe step I've been doing from the starts when i creation my virtuelenv :
~ jupyter-notebook
and i have thisin stdout
and what i have in my virtualenv
The text was updated successfully, but these errors were encountered: