Installation

Installing pypillometry and its dependencies is automated and can be done by running the following lines (on Mac OS X or Linux).

$ git clone https://github.com/ihrke/pypillometry.git
$ cd pypillometry
$ pip install -r requirements.txt
$ python setup.py install

pypillometry is on PyPI and released versions can be installed with pip (this will also install the dependencies automatically):

$ pip install pypillometry

(link to the PyPI project page).

It is also possible to install the developer’s version directly from github using pip

$ pip install git+https://github.com/ihrke/pypillometry.git

Requirements

pypillometry requires Python3 and a range of standard numerical computing packages (all of which listed in the file requirements.txt)

It is useful to access pypillometry through Jupyter or Jupyter Notebook, so installing those packages is also useful but not necessary.

All requirements can be installed by running pip install -r requirements.txt.

Virtual environments

It can sometimes be useful to install a new package in a new virtual environment using either Python’s virtual environments or conda.

$ conda create -n pypil python=3
$ conda activate pypil
$ conda install anaconda

The anaconda package contains all the requirements except pystan which can be installed from conda-forge

$ conda install -c conda-forge pystan

Pystan

Note that the installation of pystan may cause trouble on Windows-systems (you may need to install a compiler). Please follow the instructions on the Pystan-webpage should you encounter any trouble.

Notes/Potential Problems

Under Linux, I encountered a problem where pystan crashed the Jupyter kernel. To circumvent this issue, I needed to install pystan using

$ pip install pystan
$ conda install gcc_linux-64
$ conda install gxx_linux-64

otherwise, there were random crashes of the jupyter kernel for some reason.

On Mac OS X, I had some trouble getting the compiler to work with PyStan. See this issue for a solution that worked for me.

To enable interactive plotting widgets in jupyter notebook and jupyter lab, widgets need to be enabled in the notebook.

$ conda install ipywidgets nodejs
$ jupyter nbextension enable --py widgetsnbextension
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager