jupyterlab-vpython
raw JSON → 3.1.8 verified Sat May 09 auth: no python
A VPython extension for JupyterLab that enables 3D animations and simulations in notebooks. Current version is 3.1.8, released under the Jupyter ecosystem. Release cadence is irregular, with updates tied to JupyterLab version compatibility.
pip install jupyterlab-vpython Common errors
error ModuleNotFoundError: No module named 'jupyterlab_vpython' ↓
cause The extension is not installed or not activated in the current environment.
fix
Run
pip install jupyterlab-vpython and ensure the environment is the same as the JupyterLab instance. error Error: JupyterLab is not installed. Cannot proceed. ↓
cause JupyterLab is missing from the environment.
fix
Install JupyterLab with
pip install jupyterlab first, then install this extension. error Failed to fetch the extension. The server extension is not loaded. ↓
cause The extension's server-side part is not enabled or JupyterLab has not been rebuilt.
fix
Run
jupyter labextension install @jupyterlab/vpython (older versions) or jupyter lab build to regenerate the lab configuration. Warnings
breaking Requires JupyterLab 3.x; does not work with JupyterLab 4.x. Extension must be rebuilt or updated for each JupyterLab version. ↓
fix Ensure JupyterLab version is 3.x. Check compatibility before upgrading JupyterLab.
gotcha The extension must be built after installation (or prebuilt). If changes are made to the extension source, you need to rebuild. Missing rebuild results in 'Failed to fetch' or blank output. ↓
fix Run `jupyter lab build` after installing the extension, or install a prebuilt version if available.
deprecated The package is no longer actively maintained and may not work with newer Python versions (>3.10) due to dependency issues. ↓
fix Consider using an alternative like pyodide or offline VPython, or run in a Python 3.9 environment.
Imports
- canvas wrong
from jupyterlab_vpython import canvascorrectfrom vpython import canvas - sphere wrong
from jupyterlab_vpython import spherecorrectfrom vpython import sphere
Quickstart
from vpython import canvas, sphere, vector
scene = canvas(width=500, height=500)
sphere(pos=vector(0,0,0), radius=0.5, color=vector(1,0,0))