Snippets

Glotzer Group Plato Dependency Installation Tips

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

Overview

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 link, so they do not provide python3.5-and-greater packages for any OS. We could make plato backend-agnostic (link to proposal) 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 here. Some more general (non version-specific) troubleshooting-type information can be found in the documentation.

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 qt=4.8.7                      
cd /path/to/plato
pip install -r requirements_https.txt
cd

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+https://github.com/vispy/vispy.git git+https://bitbucket.org/glotzer/peact.git@master git+https://bitbucket.org/glotzer/plato.git@master
pip install ipywidgets==5.2.2 notebook==4.4.1 widgetsnbextension==1.2.6 ipykernel git+https://github.com/vispy/vispy.git git+ssh://git@bitbucket.org/glotzer/peact.git@master git+ssh://git@bitbucket.org/glotzer/plato.git@master 

Finally, link up the pieces needed by jupyter:

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

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