pythreejs
Interactive 3D graphics for the Jupyter Notebook and JupyterLab, using Three.js and Jupyter Widgets.
What it is and what it does
Pythreejs is a Python library that lets you create and display interactive 3D graphics in Jupyter notebooks and JupyterLab by wrapping the Three.js JavaScript library. It works through Jupyter Widgets, so you define 3D scenes, cameras, geometries, and materials in Python and see them rendered as interactive WebGL visualizations in your notebook cells. The package handles the communication between Python and the browser-side Three.js engine, letting you build scenes programmatically and respond to user interactions.
The library is built on top of ipywidgets, ipydatawidgets, numpy, and traitlets, which means it integrates naturally with the Jupyter ecosystem. You define 3D objects using Python classes, compose them into a scene, and display them inline. It's useful for exploratory data visualization, scientific computing, and educational demonstrations where you want interactive 3D graphics without leaving the notebook environment.
Use it for:
- Visualize 3D scientific data (point clouds, meshes, volumetric data) interactively in a notebook.
- Build educational demos or tutorials that show 3D geometry, physics simulations, or mathematical concepts.
- Explore molecular structures or other domain-specific 3D models in an interactive notebook environment.
- Create interactive dashboards that embed 3D visualizations alongside analysis code and markdown.
- Prototype 3D graphics applications before porting to a standalone Three.js or WebGL application.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pythreejs bridges Python and Three.js to render interactive 3D graphics directly in Jupyter notebooks and JupyterLab using Jupyter Widgets.
Yes, if you need interactive 3D graphics in Jupyter. The package is stable, has low install friction, and integrates cleanly with the notebook ecosystem. Maintenance is dormant but not abandoned; no known vulnerabilities exist. Be aware that setup may require manual steps on older JupyterLab versions, and the last release was in early 2023, so it may lag behind recent Three.js features.
Install
pythreejs on PyPI
pip
pip install pythreejsuv
uv add pythreejspoetry
poetry add pythreejsInstalling pythreejs
Before you install
Low install friction; ships as a pure Python wheel. Maintenance is dormant (last release 2023-02-20, last commit 2024-10-10), but the package is marked Production/Stable and has no known vulnerabilities. For JupyterLab 3+, installation is straightforward; earlier versions may require manual extension setup.
License in practice
BSD-3-Clause is permissive and imposes no significant restrictions on use or redistribution. You may use, modify, and distribute this package freely in proprietary or open-source projects.
Quickstart
pip install pythreejs
from pythreejs import *
scene = Scene(children=[PerspectiveCamera(position=[0, 0, 10])])
renderer = Renderer(scene=scene, camera=scene.children[0])
Requires Jupyter (Notebook Classic or JupyterLab) to be installed and running. For JupyterLab < 3, nodejs >= 12 may be needed and manual extension installation may be required.
Verify before relying
- Whether the package works with current JupyterLab versions (3+) without additional setup beyond pip install.
- Performance characteristics and typical scene complexity limits for interactive rendering.
- Compatibility with recent versions of Three.js and whether updates are planned.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — ipywidgets, ipydatawidgets, numpy, traitlets |
| Maintenance | dormant — 1,271 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 124,309/month — #11,874 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pythreejs-2.4.2-py3-none-any.whl
Keywords: ipython, jupyter, widgets, webgl, graphics, 3d
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
ipymplipympl enables interactive matplotlib plots in…
permissive · top 5,000 on PyPI
jupyter_bokehRenders Bokeh visualizations directly within…
permissive · top 15,000 on PyPI
ipytreeipytree provides a tree-structure widget for…
permissive · top 15,000 on PyPI
jupyterlab-widgetsEnables Jupyter/IPython widgets to render and…
permissive · top 1,000 on PyPI
py3DmolEmbeds an interactive 3D molecular viewer in…
permissive · top 15,000 on PyPI
jupyter-dashJupyter Dash lets you develop and run Plotly…
permissive · top 15,000 on PyPI
ipysigmaA Jupyter widget that renders interactive…
permissive · top 15,000 on PyPI
ipywidgetsipywidgets provides interactive HTML widgets…
permissive · top 1,000 on PyPI
ipyvuetifyProvides Jupyter notebook widgets built on…
permissive · top 15,000 on PyPI