Skip to main content

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

Project description

pythreejs

Interactive demo on Binder Install from PyPI Install from conda-forge Reuse from npm Documentation Status Build Status

A Python / ThreeJS bridge for Jupyter Widgets.

Screencast

Installation

Using pip:

pip install pythreejs

or conda:

conda install -c conda-forge pythreejs

For a development install, see the contributing guide.

The extension should then be installed automatically for your Jupyter client.

For JupyterLab <3, you may also need to ensure nodejs is installed, and rebuild the application:

# conda install -c cond-forge 'nodejs>=12'
jupyter lab build

Troubleshooting

If the extension is not automatically installed, you can manually enable it

Jupyter Notebook Classic

jupyter nbextension list
jupyter nbextension install --py --symlink --sys-prefix pythreejs
jupyter nbextension enable --py --sys-prefix pythreejs
jupyter nbextension list

You should see:

Known nbextensions:
  ...
  jupyter-js-widgets/extension  enabled
    - Validating: OK

Note for developers: the --symlink argument on Linux or MacOS allows one to modify the JavaScript code in-place. This feature is not available on Windows.

JupyterLab

To perform a source installation:

## ensure you have nodejs install, e.g. with conda
# conda install -c conda-forge 'nodejs>=12'
jupyter labextension list
jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager
jupyter labextension install --no-build jupyter-datawidgets/extension
jupyter labextension install jupyter-threejs
jupyter labextension list

You should see:

JupyterLab v...
  ...
    jupyterlab-datawidgets v... enabled OK
    @jupyter-widgets/jupyterlab-manager v... enabled OK
    jupyter-threejs v... enabled OK

This approach is not recommended for JupyterLab 3, which enables federated modules, installed via pip, conda or other package managers, and does not require rebuilding the entire application.

Uninstallation

Using pip:

pip uninstall pythreejs

or conda:

conda uninstall pythreejs

If you applied any manual steps above, it may be necessary to remove the

Jupyter Notebook Classic

jupyter nbextension disable --py --sys-prefix pythreejs

Jupyter Lab

jupyter labextension uninstall jupyter-threejs

Open Source

This software is licensed under the BSD-3-Clause License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythreejs-2.3.0.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

pythreejs-2.3.0-py2.py3-none-any.whl (3.4 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file pythreejs-2.3.0.tar.gz.

File metadata

  • Download URL: pythreejs-2.3.0.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for pythreejs-2.3.0.tar.gz
Algorithm Hash digest
SHA256 231b7fced2485fa0945e01e4dd11fbb92d4aef74376a5ebe6e7c400dcc4e3c25
MD5 8eaca990626c53c71016e4624dbee7c6
BLAKE2b-256 3ea9ae4da0dab33532348a554a924291e703ae11f35feaefd49f1d971ecaf2ce

See more details on using hashes here.

File details

Details for the file pythreejs-2.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pythreejs-2.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for pythreejs-2.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d638f600d9a7322198caaad0c4d77d89b85e4272e0d340a6c0a3f3ceaf385ed4
MD5 031ea6a943445f1fe3afcc3a2f4c6e38
BLAKE2b-256 2e36806ac843a15c67b013dc85a4761d3cc8bfa08dab70fb3f63dbc6611a5809

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page