-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Description
Hello,
I am not sure if this is the right place to post this (in the Issues section). However, since it took me some time to install wflow on Ubuntu 18.04 LTS, I figured I'll share this, maybe it helps somebody. For my specific application, I want the Python distribution to be as lean as possible. Therefore, I was not going for the Anaconda environment solution.
Compile PCRaster from source:
sudo apt install cmake gcc g++ git qtbase5-dev libncurses5-dev libqwt-qt5-dev libxerces-c-dev libboost-all-dev libgdal-dev python3-numpy python3-docopt
wget http://pcraster.geo.uu.nl/pcraster/4.2.1/pcraster-4.2.1.tar.bz2
tar xf pcraster-4.2.1.tar.bz2 && cd pcraster-4.2.1
mkdir build && cd build
cmake -DFERN_BUILD_ALGORITHM:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=$HOME/pcraster -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 ..
cmake --build .
make install
export PATH=$PATH:$HOME/pcraster/bin
export PYTHONPATH=$PYTHONPATH:$HOME/pcraster/pythonSince the automatic installation of the required Python packages did not work for me, I installed them manually using pip
sudo apt install python3-pip
pip3 install numpy
pip3 install scipy
pip3 install GDAL==$(gdal-config --version | awk -F'[.]' '{print $1"."$2}') --global-option=build_ext --global-option="-I/usr/include/gdal"
pip3 install netcdf4
pip3 install pyproj
sudo apt-get install libllvm-9-ocaml-dev libllvm9 llvm-9 llvm-9-dev llvm-9-doc llvm-9-examples llvm-9-runtime
export LLVM_CONFIG='/usr/bin/llvm-config-9'
pip3 install numba
pip3 install python-dateutilAfterwards I was cloning the git repository to my $Home directory
cd $HOME
git clone https://github.com/openstreams/wflow.gitI had to excluded the required packages in the setup.py file, which is located in $HOME/wflow/setup.py
install_requires=[
# "numpy",
# "scipy",
# "gdal",
# "netCDF4",
# "xarray",
# "cftime",
# "numba",
# "pyproj",
# "python-dateutil",
], At last wflow can be installed by using pip
cd wflow
pip3 install -e .Cheers, Sebastian
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels