Install FAST for Ubuntu Linux

Requirements

Make sure you have all the necessary requirements before installing FAST:

  • Ubuntu Linux 18.04 or newer.
  • You need the following packages:
    • sudo apt install libgl1 libopengl0 libopenslide0 libusb-1.0-0 libxcb-xinerama0
  • OpenCL: To install OpenCL on Linux, download an implementation depending on the CPU/GPU you have:

Some optional requirements are needed for video streaming and GPU neural network inference, these can be installed later.

Choose your installation method

Python

To install FAST for python (3.6 or newer), you may simply install FAST using pip, preferably using a clean python environment without conda/anaconda/similar:

pip install pyfast

To test that your installation works you can do the following from your terminal (powershell):

# Start python
python

Then run the following python code, which should display the FAST logo on your screen. If you can get an error, please see troubleshoot section below.

import fast

importer = fast.ImageFileImporter\
    .create(fast.Config.getDocumentationPath() + '/images/FAST_logo_square.png')

renderer = fast.ImageRenderer.create()\
    .connect(importer)

fast.SimpleWindow2D.create()\
    .connect(renderer)\
    .run()

To start using FAST for python, you might want to look at the Python tutorials and the Python examples page.

C++

To install FAST for C++ development, download the debian installer (fast_ubuntu18.04_X.X.X.deb) from the release page and install the package as follows:

sudo dpkg -i fast_ubuntu18.04_X.X.X.deb

This will install FAST in the directory /opt/fast/.

To test if your FAST installation works, you can the following:

cd /opt/fast/bin/
./systemCheck

You should now see the FAST logo on your screen along with some technical information on OpenCL. If you can get an error, please see troubleshoot section below.

To start using FAST, you might want to look at the C++ introduction tutorial and the C++ examples page.

Troubleshoot

  • Python
    • If you get an error saying something like ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' or ImportError: numpy.core.multiarray failed to import. Try to completely remove numpy and reinstall:
      Run the following command multiple times, until it says "Cannot uninstall numpy..": pip uninstall numpy Then reinstall numpy: pip install numpy
  • C++
    • If the installer fails you can download .tar.xz file instead, and just extract it to anywhere on your drive.
  • If you get an error saying "qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.", you are probably missing some xcb libraries, like xinerama:
    • sudo apt install libxcb-xinerama0
    • You can debug what is failing by setting environment variable QT_DEBUG_PLGINS before running fast: export QT_DEBUG_PLUGINS=1

Uninstall