Skip to content

Installation FAQ

Jean-Noël Grad edited this page May 13, 2021 · 24 revisions

Table of Contents

Installation

From sources

Installation instructions for Linux and macOS are available online for the following releases:

From packages

The software is available via package managers on:

In a Docker container

Dockerfiles with fully functional build environments can be found for multiple Linux operating systems in espressomd/docker. There is one branch per ESPResSo minor release. The docker images can be downloaded from GitHub (espressomd/packages) or DockerHub (espressomd).

Troubleshooting

CMake version is too old

Ubuntu 18.04 ships CMake 3.10, which is no longer supported. You can install a more recent version with:

pip3 install --user 'cmake==3.17'

If you need ccmake (the curses interface to CMake), you will need to compile CMake from sources.

Tutorial constant-pH fails with pint

Ubuntu 18.04 ships pint 0.8 which has several known bugs. You can install a more recent version of pint with:

pip3 install --user 'pint>=X.Y' # X.Y is found in requirements.txt

Compiler error with GCC 11

ESPResSo 4.1.3 and 4.1.4 are missing includes. Apply the patch for 4.1.3 (rpms/espresso@77dad47a) or 4.1.4 (rpms/espresso@e7dd6efa).

Compiler error with boost::optional

Error message:

/usr/include/boost/serialization/optional.hpp:98:8: error: ‘version’ is not a class template
   98 | struct version<boost::optional<T> > {
or
/usr/include/boost/serialization/optional.hpp:98:8: error: explicit specialization of undeclared template struct ‘version'
/usr/include/boost/serialization/version.hpp:36:8: error: redefinition of ‘version'

ESPResSo 4.1.3 and 4.1.4 are hit by a bug in Boost 1.74.0. Apply the patch in #3864 (comment).

Cannot import io when building the Cython code

Error message: Fatal Python error: Py_Initialize: can't initialize sys standard streams (#3149).

This is due to a faulty $PYTHONPATH environment variable. This typically happens when writing the following statement in ~/.bashrc:

export PYTHONPATH=$PYTHONPATH:$HOME/bin/python-modules

If $PYTHONPATH was initially undefined or equal to the empty string, it is now equal to :/home/user/bin/python-modules. The colon symbol is used to separate folders. A leading colon means an empty string is part of the $PYTHONPATH, which is interpreted as the current working directory. The same happens with a trailing colon.

Here is a one-liner to remove the leading colon if $PYTHONPATH is empty:

export PYTHONPATH="${PYTHONPATH:+$PYTHONPATH:}${HOME}/bin/python-modules"

Works on Bash, Dash, C shell, Z shell.

CMake cannot find ScaFaCoS

Follow the installation instructions in build-and-install-scafacos.sh. The --enable-portable-binary flag disables several architecture-specific optimizations.

This will install ScaFaCoS system-wide. To install it in a custom directory, add --prefix=${HOME}/bin/scafacos to the ./configure command, remove the ldconfig command, and add the following to your ~/.bashrc file after the installation:

export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${HOME}/bin/scafacos/lib"
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}${HOME}/bin/scafacos/lib/pkgconfig"

Clone this wiki locally