Vpython not displaying in Jupyter Notebooks

1,213 views
Skip to first unread message

Erika Ambrioso

unread,
Apr 9, 2022, 12:46:05 AM4/9/22
to VPython-users
This seems to be a problem many people have had, but none of the solutions I found worked for me. 
Currently I am just trying the bare minimum approach, but no figure displays in my notebook. The notebook runs and a blank output line appears.
Here is the code I am running:

from vpython import *
canvas()
box()

Any idea why I cannot get a display?

John

unread,
Apr 9, 2022, 1:41:19 PM4/9/22
to VPython-users

Which version of Jupyter Notebook are you using. Are you using an official release from jupyter.org ?


If so are you using a Classic Jupyter Notebook or are you using JupyterLab?

If you are using JupyterLab then you need to make sure that you installed the jupyterlab extension for vpython. You can do this with the command.

     pip install jupyterlab-vpython

See vpython install instructions here.

If you are using some third party tool for Jupyter Notebook instead of the official version from jupyter.org then vpython might not work in these third party tools.

Bruce Sherwood

unread,
Apr 9, 2022, 1:54:29 PM4/9/22
to VPython-users
By installation instructions John meant to give this link: https://vpython.org/presentation2018/install.html

I'll add that we have seen good results from using the Anaconda Python distribution.

Bruce
Reply all
Reply to author
Forward
0 new messages