Installation and advice

Dependencies and useful packages

  • Python >= 3.6

  • fftw

  • numpy, scipy, matplotlib, h5py

  • fluiddyn

  • pyfftw (simplest way to compute fft quite efficiently)

  • Pythran

    We choose to use the new static Python compiler Pythran for some functions of the operators. Our microbenchmarks show that the performances are as good as what we are able to get with Fortran or C++!


    To reach good performance, we advice to try to put in the file ~/.pythranrc the lines (it seems to work well on Linux, see the Pythran documentation):

    complex_hook = True


    The compilation of C++ files produced by Pythran can be long and can consume a lot of memory. If you encounter any problems, you can try to use clang (for example with conda install clangdev) and to enable its use in the file ~/.pythranrc with:

    CXX = clang++
    CC = clang
  • h5netcdf (only if you need netcdf files)

  • scikit-image (only for preprocessing of images)

  • PyQt5 (only for GUI)

  • ipython (important to play interactively with parameters, images and results)

  • jupyter (to try the tutorials yourself)

The simplest way to get a good environment for fluidimage is by using conda (with anaconda or miniconda). If you use conda, install the main packages with:

conda config --add channels conda-forge

conda install numpy scipy matplotlib h5py imageio scikit-image pyqt

conda install ipython jupyterlab

# to use clang to compile C++ files produced by Pythran
conda install clangdev

and the other packages with pip:

pip install pyfftw pythran h5netcdf colorlog fluiddyn

Installation with pip

FluidImage can also be installed from the Python Package Index:

pip install fluidimage --pre

The --pre option of pip allows the installation of a pre-release version.

However, the project is in an active phase of development so it can be better to use the last version (from the mercurial repository hosted on Bitbucket).