Closed analkumar2 closed 2 years ago
Hi
Have a look at this example which seems to work.
https://mybinder.org/v2/gh/jcoady/vpbindernbs/HEAD
You can open up any of the notebooks and they run the demo vpython notebooks listed on mybinder.
This is from the following github repository to demonstrate vpython on mybinder.
https://github.com/jcoady/vpbindernbs
Have a look at the requirements.txt file in the binder directory in this repository to make sure you have something similar for running on jupyterlab in mybinder. The requirements file for this demo contains the following.
vpython==7.6.3 jupyterlab==3.2.8 jupyterlab-vpython==3.1.3 numpy matplotlib
It might be getting stuck for websocket to connect if you haven't installed the jupyterlab extension for vpython package called jupyterlab-vpython.
@jcoady Thanks a lot. The solution was to add the postBuild file with the line 'jupyter labextension enable jupyterlab_vpython' in my repo. I was installing jupyterlab-vpython and enabling it in the jupyternotebook session using '!jupyter labextension enable jupyterlab_vpython' but somehow that does not work.
The example index.ipynb file on mybinder does not work (https://mybinder.org/v2/gh/vpython/vpython-jupyter/eb99b4faab7b223d4bbfebbe0d5dec0e0a1fce60). It is stuck at waiting for websocket to connect. Upgrading the vpython to vpython7.6.4rc1 works there.
Unfortunately, the upgrading does not help in a mybinder I created myself - https://mybinder.org/v2/gh/analkumar2/moose-examples-jupyter/a31add94d3b3cf658956a1638b1ab0f6afc08e53 There, even after upgrading vpython to the development version, it gets stuck at waiting for websocket to connect.