skillfed

pythreejs

Interactive 3D graphics for the Jupyter Notebook and JupyterLab, using Three.js and Jupyter Widgets.

pythreejs v2.4.2 124.3K downloads/30d#11,874 on PyPI988
Permissive license BSD-3-Clause DORMANT released

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 pythreejs

uv

uv add pythreejs

poetry

poetry add pythreejs

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: JavaScriptProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Multimedia :: Graphics

Tags

3d graphics jupyter notebookthree.js python wrapperinteractive 3d visualization jupyterwebgl jupyter widgets3d rendering jupyter labthreejs jupyter bridgeinteractive 3d plots jupyter
jupyter-widgets3d-visualizationwebgl

More Graphics packages