Skip to content
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

Notebook with ipyvolume not working : install problem ? #415

Open
patquem opened this issue Sep 5, 2022 · 9 comments
Open

Notebook with ipyvolume not working : install problem ? #415

patquem opened this issue Sep 5, 2022 · 9 comments

Comments

@patquem
Copy link

patquem commented Sep 5, 2022

Hello,

One year ago, I succeed in using ipyvolume with a python-3.7.7 kernel.
Today, working on a new virtual env (with the same python kernel), impossible to make my notebook running.
From a new ('empty') virtual env. , I have tested and limited the 'pip' install process to the following packages :

  • pip install numpy
  • pip install notebook
  • pip install ipywidget

a jupyter nbextensions list shows that ipyvolume and jupyter-threejs are both enabled.

For testing, I have executed the example given in the the first page of the ipyvolume website (the one with ipv.quickvolshow()), and nothing happened.

Note that when opening a new .ipynb, the following messages appears in my console :

[I 11:08:43.203 NotebookApp] Creating new notebook in /libs/common/notebooks
[W 11:08:44.385 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20220905110826 (::1) 6.030000ms referer=http://localhost:8888/notebooks/libs/common/notebooks/Untitled.ipynb?kernel_name=python3
[I 11:08:44.388 NotebookApp] Kernel started: 101fa28b-9754-4e8f-925c-b49df97331cd, name: python3
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
[IPKernelApp] WARNING | No such comm: 46087822-cd9d-4712-b126-b83734d4178e

But according to notes on forum this error and warning are harmless (jupyter-widgets/ipywidgets#3454 or https://discourse.jupyter.org/t/ipkernelapp-error-and-warning/13820/7). (I was not faced to these messages in my previous virtual env)

Then, when running the example, the following error messages appear :

[W 11:09:15.941 NotebookApp] 404 GET /static/jupyter-threejs.js?v=20220905110826 (::1) 0.000000ms referer=http://localhost:8888/notebooks/libs/common/notebooks/Untitled.ipynb?kernel_name=python3
[W 11:09:15.990 NotebookApp] 404 GET /static/three.js?v=20220905110826 (::1) 0.000000ms referer=http://localhost:8888/notebooks/libs/common/notebooks/Untitled.ipynb?kernel_name=python3

Any idea of what's wrong ?
Do you reproduce these problems when installing ipyvolume ?
Any suggestion to do a correct ipyvolume install ?
(I pass a lot of time to try to fix this problem : downgrading packages / adding jupyter complement ones .. without any success).

Thank you for your help,
Patrick

@patquem
Copy link
Author

patquem commented Sep 5, 2022

Note that when downgrading pythreejs from 2.4.1 to 2.3.0, the notebook returns the following outputs:

image

@ixakalabadie
Copy link

I get almost the same messages. When I open the notebook:

[W 16:52:19.689 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20221010165117 (127.0.0.1) 1.090000ms referer=http://localhost:8889/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb

except that I do not get the "comm target" error message (the first times i installed everything I did but not anymore).

When I run the code (e.g. ipv.quickvolshow(V, level=[0.25, 0.75], opacity=0.03, level_width=0.1, data_min=0, data_max=1)) the kernel gets stuck and I have to disconnect the notebook server. The error message I get:

[W 16:53:38.313 NotebookApp] 404 GET /static/jupyter-threejs.js?v=20221010165117 (127.0.0.1) 3.020000ms referer=http://localhost:8889/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb
[W 16:53:38.682 NotebookApp] 404 GET /static/three.js?v=20221010165117 (127.0.0.1) 1.840000ms referer=http://localhost:8889/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb

If I just run ipv.figure() nothing shows but the kernel does not get stuck.

I installed all the packages with conda with the latest versions

@jcfaracco
Copy link

Probably, I'm getting a similar result when I run a simple example using Lab:

[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'FigureModel' from module 'ipyvolume'
loadClass@http://127.0.0.1:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.bcbea9feb6e7c4da7530.js?v=bcbea9feb6e7c4da7530:1:74977
loadModelClass@http://127.0.0.1:8888/static/lab/4416.e3828afa11aab94744e3.js?v=e3828afa11aab94744e3:1:11350
_make_model@http://127.0.0.1:8888/static/lab/4416.e3828afa11aab94744e3.js?v=e3828afa11aab94744e3:1:9238

My versions:

  • jupyter: 3.4.7
  • notebook: 6.4.12

All minimal dependencies are met, including the extensions and the installation doc.

@jcfaracco
Copy link

@ixakalabadie I tested using a notebook only and I got the same behavior. 😞

@mlamarre
Copy link

I had the same behavior.
Contrary to @patquem using pythreejs==2.3.0 worked for me.

Maybe because of the package manager. Here's how I downgraded pythreejs:

mamba install pythreejs==2.3.0 -c conda-forge

Mamba then decided on its own to use ipywidgets==7.7.2, jupyterlab_widgets==1.1.1 and widgetnbextension==3.6.1.

My notebooks were working fine July 24th 2022, pythreejs and ipywidgets both got bumped since then, so it could be any of the two.

@ixakalabadie
Copy link

I downgraded to pythreejs=2.3.0 and it changed to ipywidgets=7.6.5, jupyterlab_widgets=3.0.3 and widgetnmextension=3.5.2. Still didn't work. I forced ipywidgets=7.7.2 and it changed the other packages to the versions @mlamarre mentioned but still no luck.
This is the error I get now:

[W 12:52:26.827 NotebookApp] 404 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css (127.0.0.1) 2.330000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb
[W 12:52:27.520 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20221019125136 (127.0.0.1) 1.770000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb
[I 12:52:27.524 NotebookApp] Kernel started: cc0ff42d-e744-4ede-baaa-3cbb31fab738, name: python3
[W 12:52:54.832 NotebookApp] 404 GET /static/jupyter-threejs.js?v=20221019125136 (127.0.0.1) 5.540000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb
[W 12:52:55.367 NotebookApp] 404 GET /static/three.js?v=20221019125136 (127.0.0.1) 2.550000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb <

Could you @mlamarre send the list of all installed packages in your environment for comparison?
Thanks

@mlamarre
Copy link

Here is my full environment,
environment.yml

I still see the following logs, but everything works fine:

[E 15:53:20.345 NotebookApp] Could not open static file ''
[W 15:53:20.383 NotebookApp] 404 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css (::1) 7.000000ms referer= [redacted]
[W 15:53:26.053 NotebookApp] 404 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css (::1) 2.000000ms referer=http://localhost:8888/notebooks/[redacted]
[I 15:53:26.706 NotebookApp] Kernel started: [redacted] name: python3
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.control
[IPKernelApp] WARNING | No such comm: [redacted]

@ixakalabadie
Copy link

Thank you.
I created it but still does not work. You are using windows right? I am using ubuntu 22.04.
Some errors I get are the same but I have some other ones as well:

[E 11:56:37.449 NotebookApp] Could not open static file ''
[W 11:56:37.627 NotebookApp] 404 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css (127.0.0.1) 7.720000ms referer=http://localhost:8888/tree?token=1489dd20117a86a0f4060f4551d0298cc3e0d5f2f7284812
[W 11:56:47.249 NotebookApp] 404 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css (127.0.0.1) 2.800000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb
[W 11:56:47.785 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20221026115635 (127.0.0.1) 1.760000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb
[I 11:56:48.042 NotebookApp] Kernel started: 016c4781-2e20-4e2c-9191-9ef238857796, name: python3
[W 11:56:58.572 NotebookApp] 404 GET /static/jupyter-threejs.js?v=20221026115635 (127.0.0.1) 4.510000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb
[W 11:56:59.060 NotebookApp] 404 GET /static/three.js?v=20221026115635 (127.0.0.1) 1.850000ms referer=http://localhost:8888/notebooks/Visualization/ipyvolume/ipyvolume_test.ipynb

@kevinwwillis
Copy link

I had the same behavior. Contrary to @patquem using pythreejs==2.3.0 worked for me.

This also worked for me. I reinstalled Jupyter, ipywidgets, and all else related to ipyvolume. After this, ipyvolume still did not work and I continued to get the two 404s that @patquem had. Downgrading pythreejs to 2.3.0 finally got ipyvolume working for the first time on my remote machine. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants