Glotzer Group Plato Dependency Installation Tips

You are viewing an old version of this snippet. View the current version.
Revised by Matthew Spellings f420979


Sometimes it can be difficult to get an entire working stack of vispy and its dependencies, especially with jupyter and friends involved. In this document we'll try to keep living walkthrough-style guides using particular working versions of packages. If something doesn't work, please edit it to update or create an issue here.

Pip installation (virtualenv)

If We strongly encourage the use of virtual environments with plato as opposed to installing into your home directory (python install --user or pip install -e). This is because of how easy it is to mix inconsistent versions of jupyter kernels, ipywidgets, the notebook extension, and vispy if you have cruft from other installations lying around. This method will use the system site-packages directory as a base, in case you want to use versions of (for example) pyside, numpy, tensorflow, or other packages that are installed by your package manager. First set up the environment:

mkdir -p ~/env
python -m venv --system-site-packages ~/env/plato
source ~/env/plato/bin/activate

Install jupyter and its dependencies, forcing it to be installed within the environment (an externally-installed jupyter may not have the kernel set up to work inside the virtual environment, for example); note that vispy doesn't currently work with ipywidgets 7 or greater:

pip install -I jupyter ipywidgets==6.0.0                                                                                  

Finally, install plato and any other dependencies:

pip install matplotlib vispy plato-draw

You can clone a snippet to your computer for local editing. Learn more.