-
Notifications
You must be signed in to change notification settings - Fork 18
Installation
- Boost >= 1.59
- Armadillo >= 6.6
- GNU Scientific Library
- Netcdf
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 libarmadillo6 libarmadillo-dev
Note that Ubuntu Xenial only has Armadillo 6.5 in its apt repository. In that case you need to install Armadillo 6.6 or later manually.
The easiest is to install the latest release of the package using pip. 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.
-
Install extra requirements
These are only required when installing from source
sudo apt install swig cmake
- Set up cmake installation
mkdir build
cd build
cmake ..
- Install the C++ library
sudo make install
This will install the library in /usr/local/lib/libgridpp.so
and the gridpp command-line client in
/usr/local/bin/gridpp
. To specify a custom installation path, use the following in step 3:
cmake .. -DCMAKE_INSTALL_PREFIX=<custom path>
- Install the python bindings
make install-python-user
This installs the python bindings in
~/local/lib/python3.6/site-packages/gridpp.py
. To install the python bindings system-wide, use sudo make install-python
instead.
- Install the R bindings
make build-r
Currently, the R package is not installed centrally, but instead is placed in extras/SWIG/R/gridpp.R
in the build directory.