vpython not working in visual studio code

56 views
Skip to first unread message

Sasmitha Purushothaman

unread,
Apr 24, 2024, 1:56:36 PMApr 24
to VPython-users
Hello,

I have vpython downloaded and installed. However, when I try to run code in a jupyter notebook on visual code studio, the code just keeps running without any output popping up. As you can see below, it's been running for over 2 minutes without an output or an external popup. I have tried forcing an external browser and 
while True:
    rate(30)
but neither makes the code finish. Please let me know if more information is needed to fix this issue.

image.pngimage.png

John

unread,
Apr 24, 2024, 4:04:19 PMApr 24
to VPython-users
Have a look at this video for running vpython in visual studio code.


It shows how to get started running vpython in no_notebook mode in visual studio code in the first 15 minutes of the video with a demo. I am not sure if the jupyter notebook in visual studio code supports vpython. If vscode is not using jupyterlab version 4.x   or notebook version 7.x then it probably won't work. Also make sure you are using the latest release of vpython which is version 7.6.5. 

If you can't get that to work and you want to run vpython in a desktop app you can try installing the JupyterLab Desktop App which works with vpython. 



Also you can try running vpython in a jupyter notebook in the cloud using mybinder.org by setting up your own github repository with your jupyter notebooks with a "binder" directory like in this github repository which will then make sure the python packages in that directory including vpython are installed in mybinder.org


You can run this demo which has several vpython demo jupyter notebook files in jupyterlab interface in the cloud in mybinder with this link.


John
Reply all
Reply to author
Forward
0 new messages