Skip to content

Using pythreejs in a Jupyter notebook

Hal Snyder edited this page Apr 11, 2018 · 2 revisions

What is pythreejs?

pythreejs is a Jupyter-widgets-based notebook extension bridging Python with the threejs library for 3D animation in the web browser.

Using pythreejs in a Jupyter notebook with CoCalc

Here's what you can do e.g. to run these pythreejs examples:

  1. Do the following in a CoCalc .term:
pip3 install --user pythreejs
jupyter nbextension install --user --py pythreejs
jupyter nbextension enable --user --py pythreejs
# it may be necessary to restart the jupyter server
smc-jupyter restart
  1. From CoCalc Project Settings (wrench icon), start the Plain Jupyter Server (link at lower right of page).

  2. Start a Jupyter notebook with the Python 3 (Ubuntu Linux) kernel you should be able to run pythreejs code.

Clone this wiki locally