How to install the Python geological modeling library Gempy in Windows with Debian and WSL

gempyGeologicalModeling2.png

Gempy is an open-source library for modeling geology written in Python. The library is capable of creating complex 3D geological models including structures, fault networks, and unconformities and it can be coupled with uncertainty analysis.

Due to the required packages and specific configuration the installation of Gempy is a challenge on Windows, we have developed an alternative installation process by the use of a Debian kernel under a Windows Subsystem for Linux. This tutorial shows the complete procedure to install Gempy from the Debian kernel setup to the review of the Gempy in Python.

Instructions

Enable Windows Subsystem for Linux (WSL) following the Manual Installation Steps from this link:

https://docs.microsoft.com/en-us/windows/wsl/install-win10

Install Debian or Ubuntu from the Windows Store

Insert username: “hatari” and password: “labs”

Update the Debian repositories and install packages:

sudo apt update && sudo apt install python-qt4 python3-pip libgl1-mesa-glx python3-gdal xvfb

Review files from root:

ls -a

Create a folder for the binaries:

mkdir .local

mkdir .local/bin

Edit the profile file:

nano .profile

Add this text at the bottom:

# set PATH so it includes local bin if it exists

if [ -d "/home/hatari/.local/bin" ] ; then

PATH="/home/hatari/.local/bin:$PATH"

fi

Update the profile configuration and show all environment variables:

source .profile

env

Install gempy and jupyterlab:

pip3 install numpy==1.16.5

pip3 install pyside2 jupyterlab gempy


Tutorial

Comment

Saul Montoya

Saul Montoya es Ingeniero Civil graduado de la Pontificia Universidad Católica del Perú en Lima con estudios de postgrado en Manejo e Ingeniería de Recursos Hídricos (Programa WAREM) de la Universidad de Stuttgart con mención en Ingeniería de Aguas Subterráneas y Hidroinformática.

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.