Glotzer Group Plato Dependency Installation Tips

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


There are a few pain points with plato's dependencies:

  1. Using PySide as the desktop GUI backend. Because it is a wrapper around Qt, it can be difficult to get consistently-linked versions without using a package manager. Furthermore, the pyside devs can't currently support windows for python3.5 and greater, so they do not provide python3.5-and-greater packages for any OS. We could make plato backend-agnostic ( to work around needing pyside, so let Matthew know if you're interested in helping fix this!
  2. Using jupyter notebooks. The python packages notebook (jupyter notebook server library), ipywidgets (python-side notebook widgets code), and widgetsnbextension (browser-side notebook widgets code) need to have consistent versions installed simultaneously. This difficulty is somewhat increased by jupyter's extension interface using global state inside your home directory.

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 Some more general (non version-specific) troubleshooting-type information can be found

Conda installation

This gives consistent versions for desktop (plato.viz) usage and jupyter notebook usage.

~/.anaconda3/bin/conda create -n plato python=3.5
source ~/.anaconda3/bin/activate plato                       
conda install -c conda-forge ipywidgets==5.2.2 notebook==4.4.1 widgetsnbextension==1.2.6
conda config --add channels file:///nfs/glotzer/software/conda-private                                        
conda install pyside matplotlib                             
cd /path/to/plato
pip install -r requirements_https.txt

Pip installation (virtualenv)

This will at least work for jupyter notebooks; pyside installation depends on having installed Qt using another method. Set up the environment:

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

Select only one of the two lines below, depending on which way you authenticate to bitbucket:

pip install ipywidgets==5.2.2 notebook==4.4.1 widgetsnbextension==1.2.6 ipykernel git+ git+ git+
pip install ipywidgets==5.2.2 notebook==4.4.1 widgetsnbextension==1.2.6 ipykernel git+ git+ssh:// git+ssh:// 

Finally, link up the pieces needed by jupyter:

~/env/plato/bin/jupyter nbextension enable --py widgetsnbextension
python -m ipykernel install --user

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