Code Monkey home page Code Monkey logo

pythreejs's Introduction

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.

pythreejs's People

Contributors

vidartf avatar davidmascharka avatar jasongrout avatar abelnation avatar sylvaincorlay avatar bollwyvl avatar agoose77 avatar logicalemotion avatar mgeier avatar maartenbreddels avatar yungyuc avatar aothms avatar jsb avatar genevievebuckley avatar glyg avatar avmarchenko avatar nrbgt avatar nlooije avatar toddrme2178 avatar dependabot[bot] avatar farizrahmat avatar gouarin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.