-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
There are three components to gridpp: The gridpp command-line tool, the gridpp library, and the gridpp python package.
- Boost >= 1.59
- Armadillo >= 6.6
- GNU Scientific Library
- Netcdf
- CMAKE (if compiling gridpp from source)
On Ubuntu Bionic, these can be installed like this:
sudo apt-get update
sudo apt-get install libboost-all-dev
sudo apt-get install libgsl0-dev libblas-dev
sudo apt-get install netcdf-bin libnetcdf-dev
sudo apt-get install cmake
sudo apt-get install libarmadillo6 libarmadillo-dev
Note that Ubuntu Xenial only has Armadillo 6.5 in its apt repository. On Xenial, you need to install Armadillo 6.6 or later manually.
A python package for the gridpp library is available on pypi.org. Provided you have installed the dependencies listed above, you can install the most recent release of the python package as follows:
pip3 install gridpp --user
To check that the installation worked, run the following in python3:
import gridpp
print(gridpp.version())
-
Either download the source code from the latest release, unzip the file and navigate into the extracted folder; or clone the repo from github.
-
Create a build directory
mkdir build
- Run cmake to set up installation
cd build
cmake ..
This will set up the gridpp command-line tool to be installed in /usr/local/bin on Ubuntu. To specify a custom installation path, use:
cmake .. -DCMAKE_INSTALL_PREFIX=<custom path>
- Run cmake to install
cmake --build .
cmake --build . --target install