Installation#

Prerequisites#

FlickerPrint is available for Windows, macOS and Linux and requires a working installation of Python 3 (Python 3.9 - Python 3.11, Python 3.10.8 is recommended) and Java. We recommend that you install Java in your home directory for easy access. There is also the option to use LaTeX for typsetting of figures, however this is not required.

System-Specific Prerequisites#

In addition to Python and Java, you will need to install a C compiler. Please install Visual Studio 2022 Community Edition (or higher) from here and install the Desktop Development with C++ tools and .NET dektop development tools.

In addition to Python and Java, you will need to install the xcode command line tools if you do not have them already. To do this, open the terminal and type:

xcode-select --install

Note

If you are using an Apple Silicon Mac (likely any Mac made after 2020), you may also need to manually install the h5py python library using a compatable version of HDF5. At the time of writing, the version of HDF5 which ships with h5py does not support Apple Silicon. This module is used to read and write the data files produced during the analysis.

To do so, first install homebrew if you do not have it already:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo >> /Users/dev/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/dev/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Then use it to install HDF5 and h5py:

brew install hdf5
export HDF5_DIR="$(brew --prefix hdf5)"
python3 -m pip install --no-binary=h5py h5py

No Linux-specific software is required, though you will still need a working installation of Python and Java, and a C compiler.

Installation via pip#

To install FlickerPrint, download the source code from GitHub. Open the terminal and navigate to the FlickerPrint/src directory. Then install it using pip:

python -m pip install .
python3 -m pip install .
python3 -m pip install .

Please note that FlickerPrint is not yet available on the Python Package Index (PyPI). This will be available shortly.

Note

The JAVA_HOME and PATH environment variables must be set correctly so that the Java installation can be found by the Python modules that require it. FlickerPrint will attempt to set these automatically on installation, though you can also set them manually using the instructions below.

Setting Environment Variables#

When Java is installed on Windows, the JAVA_HOME environment variable is set automatically. However, if you need to set enviroment vairables manually, you can find instructions for doing so here.

You will need to set the JAVA_HOME environement variable and add it to your PATH. To do this open the terminal and type (changing <pathToJava/home> to the location of your Java installation):

export JAVA_HOME=<pathToJava/home>
export PATH=$JAVA_HOME/bin:$PATH

You may find it helpful to add the above lines to your config file for easy access in future (optional). To do so, open the appropriate config file for your system:

Likely

nano ~/.zprofile

Then add the above two lines to the file, save it and relaunch the terminal.

You will need to set the JAVA_HOME environement variable and add it to your PATH. To do this open the terminal and type (changing <pathToJava/home> to the location of your Java installation):

export JAVA_HOME=<pathToJava>
export PATH=$JAVA_HOME/bin:$PATH

You may find it helpful to add the above lines to your config file for easy access in future (optional). To do so, open the appropriate config file for your system:

Likely

nano ~/.bashrc

Then add the above two lines to the file, save it and relaunch the terminal.

Installation with Docker#

A Dockerfile is available in the root directory of the GitHub repository for building a Docker image of FlickerPrint. To build the image, open a terminal and navigate to the root directory of the repository. Then run the following command:

docker build -t flickerprint .

To run the image, use the following command:

docker run -it flickerprint