Installation

From binary packages

Pip

Install x86 binary packages from PyPI:

pip3 install openturns

For an installation without administrative priviledges the option --user can be used. Note that pip does not install pre-releases unless given the option --pre.

Conda

This is relevant to the Conda userland Python package manager.

As binary dependency packages from the conda-forge channel are not compatible with ones from the default channel, openturns packages are not working on top of Anaconda. Instead, we recommend installing conda from Miniforge where conda is configured to prioritize packages from conda-forge out of the box. This can also be achieved with Miniconda with extra steps. On Windows just download the matching miniforge exe and follow the instructions, on Linux you can install it from command-line in one go:

wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -P /tmp
bash /tmp/Miniforge3-Linux-x86_64.sh -b -p $HOME/miniforge
PATH="$HOME/miniforge/bin:$PATH"

Then it should be ready to install packages:

conda install -y openturns

Note that conda can be slow or fail at resolving complex environments with many packages so when a full upgrade is needed our advice is to create a new environment from scratch (see also Mamba).

Alternatively, you can download the otconda bundle containing the library and its modules that allows for an offline installation. Note that pre-releases are published on conda-forge like regular releases, so if you want to stick to the stable version you will have to explicitly specify the required version, eg conda install openturns=1.18.

Windows

Download the installer matching your python version and architecture from GitHub Then just run installer and follow the instructions.

A non-interactive installation is also possible with the command line:

openturns-1.18-py38-x86_64.exe /userlevel=1 /S /FORCE /D=%PREFIX%

macOS

Installation options include pip and conda for x86 processors. For ARM processors binary packages are only provided via conda for now.

Debian/Ubuntu

We support the following Debian-based distributions:

Distribution name

Repository address

Ubuntu 20.04 LTS ‘Focal Fossa’

deb https://openturns.github.io/apt/ubuntu focal main

Ubuntu 22.04 LTS ‘Jammy Jellyfish’

deb https://openturns.github.io/apt/ubuntu jammy main

Debian 11.0 ‘Bullseye’

deb https://openturns.github.io/apt/debian bullseye main

Add the mirror signature:

curl -s https://openturns.github.io/apt/public.key | sudo apt-key add -

To be able to retrieve packages, you must add the appropriate repository address to your sources list. To do so, you may either use the graphical user interface of aptitude or you can edit the sources-list file (/etc/apt/sources.list).

For instance, assuming you are running Ubuntu 22.04, add the following source to your sources list:

echo deb https://openturns.github.io/apt/ubuntu jammy main | sudo tee /etc/apt/sources.list.d/openturns.list

Note

Use the bash command lsb_release -c in order to determine the codename of your distribution.

You may want to enable apt https support to be able to fetch from github.io:

sudo apt install apt-transport-https

After editing aptitude’s sources-list, you must update your packages database using either the graphical interface or by issuing the following command:

sudo apt update

The following packages are available:

Package name

Description

libopenturns0.x

library

libopenturns-dev

development package

python3-openturns

Python module

To install the Python module:

sudo apt install python3-openturns

RPM-based distributions

Add the repository corresponding to your operating system:

curl http://download.opensuse.org/repositories/science:/openturns/CentOS_8/science:openturns.repo -o /etc/yum.repos.d/science-openturns.repo
curl http://download.opensuse.org/repositories/science:/openturns/Fedora_36/science:openturns.repo -o /etc/yum.repos.d/science-openturns.repo
curl http://download.opensuse.org/repositories/science:/openturns/openSUSE_Leap_15.3/science:openturns.repo -o /etc/yum.repos.d/science-openturns.repo
curl http://download.opensuse.org/repositories/science:/openturns/Mageia_8/science:openturns.repo -o /etc/yum.repos.d/science-openturns.repo

Import the gpg key corresponding to your operating system:

rpm --import http://download.opensuse.org/repositories/science:/openturns/CentOS_8/repodata/repomd.xml.key
rpm --import http://download.opensuse.org/repositories/science:/openturns/Fedora_36/repodata/repomd.xml.key
rpm --import http://download.opensuse.org/repositories/science:/openturns/openSUSE_Leap_15.3/repodata/repomd.xml.key
rpm --import http://download.opensuse.org/repositories/science:/openturns/Mageia_8/repodata/repomd.xml.key

The following packages are available:

Package name

Description

openturns-libs

library

openturns-devel

development package

python3-openturns

Python module

To install the Python module:

yum install python3-openturns

Archlinux

Install from AUR:

aurman -S openturns

FreeBSD

Install from FreshPorts:

pkg install openturns

Development version

From source

Install the required External dependencies and build the development branch:

git clone https://github.com/openturns/openturns.git
cd openturns
cmake -DCMAKE_INSTALL_PREFIX=~/.local .
make install

Note

When installing into ~/.local you don’t need to set PYTHONPATH environment variable for Python to be able to import openturns

Weekly builds

Weekly built Python binaries are also available with the latest bugfixes and features, but also with new bugs and API changes, use at your own risk:

pip3 install --pre --extra-index-url https://pypi.anaconda.org/openturns-wheels-nightly/simple --upgrade --force-reinstall openturns