widgetti / ipyvolume

3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
MIT License
1.95k stars 236 forks source link

Can I use this on Google Colaboratory? #147

Open tomizo103 opened 6 years ago

tomizo103 commented 6 years ago

Hi. Thank you for making wonderful library!

I tried to install this to Google Colaboratory.

!pip install ipyvolume worked well. But Colaboratory is not jupyter itself, so I couldn't do jupyter nbextension enable --py --sys-prefix ipyvolume jupyter nbextension enable --py --sys-prefix widgetsnbextension

I tried this and it also worked well,

!pip install ipywidgets~=7.0.0

But I couldn't see any result images for 2-3 examples. (Quick Intro, Volume, Scatter plot, etc.)

I use safari ver11.1.1 from MacBook Pro, macOS High Sierra ver10.13.5

In my local jupyter environment, I can see the result images on safari, but not on Chrome ver67.0.3396.87, so I tried to access Colaboratory with safari.

Is there any way to try?

Thank you.

maartenbreddels commented 6 years ago

Hi Norio,

thanks for the kinds words! I have no idea how colab works, I should look into it! I'll keep this open as a reminder. Can you try ipyvolume 0.4.6 (I just had a fix for chrome released).

cheers,

Maarten

tomizo103 commented 6 years ago

Thank you!

I uninstalled 0.4.5 and installed 0.4.6, and did

jupyter nbextension enable --py --user ipyvolume jupyter nbextension enable --py --user widgetsnbextension

I saw the sliders but no result image...

2018-06-24 19 06 06 2018-06-24 19 07 37

By the way, I can't see neither the images on top page of ipycolume by Chrome. 2018-06-24 19 02 49

Both of them works well on Safari ver11.1.1(13605.2.8)

OliverEvans96 commented 6 years ago

Are there errors in the Javascript console in either case? Those errors tend to provide a good starting point for debugging missing elements.

maartenbreddels commented 6 years ago

Given https://stackoverflow.com/questions/47269168/ipywidgets-with-google-colaboratory and https://github.com/googlecolab/colabtools/issues/60 it seems colab is currently not supported.

qo4on commented 5 years ago

Does it work on Google Colaboratory?

asuagar commented 5 years ago

@qo4on I tried to use ipyvolume in Google Golab with no success. Executing the pasted code, a message telling "Runtime disconnected" was shown and the code cell keep running in a loop. No figure was shown.

import ipyvolume as ipv
import numpy as np
x, y, z = np.random.random((3, 10000))
ipv.quickscatter(x, y, z, size=1, marker="sphere")

Is there any news or advances in this issue?

qo4on commented 5 years ago

More than a year have passed. Obviously they are not going to fix this bug.

asuagar commented 5 years ago

Anybody knows a library for scatter 3D visualization in Google Colabs?

maartenbreddels commented 5 years ago

Is there any news or advances in this issue?

We've spoken to some of the colab people, and they are working on supporting widgets. However, as I understood it, they need to manually support specific widget libraries, for instance core ipywidgets seems supported. I cannot add support for colab, colab needs to add ipyvolume javascript code at their side.

I tried running the code, and I saw in the JS console of the browser:

Uncaught (in promise) Error: Widgets module jupyter-threejs is not supported

So step 0 would be to ask colab to support that first.

More than a year have passed. Obviously they are not going to fix this bug.

I'm not sure that's obvious.

asuagar commented 5 years ago

Hello @maartenbreddels. Thank you for your response and your work. VAEX is really astonishing. I have just sent a tweet to Google Colab. I hope that it helps to alleviate the lack of support given by them. Best regards!

korakot commented 4 years ago

Three.js seems to be supported now. But not jupyter-threejs

https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/notebooks/threejs_visualization.py