Installation
Wheels
It is highly recommended that you use a pre-built wheel of pyspex from PyPI.
If you have an existing Python (3.8+) installation (e.g. a python.org download, or one that comes with your OS), then on Windows, MacOS/OSX, and Linux on Intel computers, pre-built pyspex wheels can be installed via pip from PyPI:
pip install [--user] pyspex
OS-Specific remarks
On a Debian Bullseye or Ubuntu 22.04 installation, we have successfully installed pyspex as follows:
sudo apt install python3-numpy python3-scipy
sudo apt install python3-h5py python3-netCDF4
pip install --user pyspex
This will also install a working version of the package xarray.
Important
The version of xarray which comes with the Debian package python3-xarray is too old, and will not work with pyspex.
Building from source
The latest release of pyspex is available from gitHub. You can obtain the source code using:
git clone https://github.com/rmvanhees/pyspex.git
We develop the code using Python 3.10 using the latest stable release of the libraries HDF5 and netCDF4, and Python packages: numpy, h5py, netCDF4-python and xarray.
To compile the code you need the Python packages: setuptools, setuptools-scm and wheels. Then you can install pyspex as follows:
python3 -m build
pip3 install dist/pyspex-<version>.whl [--user]