-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
The easiest is to install the latest release of the package using pip, which comes with precompiled binaries so no non-python dependencies are required:
pip install gridpp --user
Precompiled binaries are available for Python 2.7 and 3.5-3.11. To check that the installation worked, run the following in python:
import gridpp
print(gridpp.version())
- 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
sudo apt install swig cmake
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.
Either download the source code from the latest release, unzip the file and navigate into the extracted folder; or clone the repo from github.
mkdir build
cd build
cmake ..
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>
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.
If you only want to build the package, and want to install it in a custom location instead, run:
make build-python
and copy extras/SWIG/python/gridpp.py
and extras/SWIG/python/_gridpp.so
to the desired location.
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.