--- id: pythreejs version: "2.4.2" license: BSD-3-Clause license_treatment: permissive maintenance: dormant --- # pythreejs — Interactive 3D graphics for the Jupyter Notebook and JupyterLab, using Three.js and Jupyter Widgets. License: permissive · Maintenance: dormant · Downloads: 124.3K/mo ## 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 above — 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 pip install pythreejs uv add pythreejs 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_current - Install friction: low - Maintenance: dormant - Downloads: 124.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags 3d graphics jupyter notebook, three.js python wrapper, interactive 3d visualization jupyter, webgl jupyter widgets, 3d rendering jupyter lab, threejs jupyter bridge, interactive 3d plots jupyter, jupyter-widgets, 3d-visualization, webgl [View on SkillFed](https://skillfed.io/packages/pythreejs) · [View on PyPI](https://pypi.org/project/pythreejs/)