A Python / ThreeJS bridge for Jupyter Widgets.
Using pip:
pip install pythreejsor conda:
conda install -c conda-forge pythreejsFor 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 ensurenodejsis installed, and rebuild the application:# conda install -c cond-forge 'nodejs>=12' jupyter lab build
If the extension is not automatically installed, you can manually enable it
jupyter nbextension list jupyter nbextension install --py --symlink --sys-prefix pythreejs jupyter nbextension enable --py --sys-prefix pythreejs jupyter nbextension listYou should see:
Known nbextensions: ... jupyter-js-widgets/extension enabled - Validating: OKNote for developers: the
--symlinkargument on Linux or MacOS allows one to modify the JavaScript code in-place. This feature is not available on Windows.
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 listYou 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,condaor other package managers, and does not require rebuilding the entire application.
Using pip:
pip uninstall pythreejsor conda:
conda uninstall pythreejsIf you applied any manual steps above, it may be necessary to remove the
jupyter nbextension disable --py --sys-prefix pythreejsjupyter labextension uninstall jupyter-threejsThis software is licensed under the BSD-3-Clause License.
