How to install the Python geological modeling library Gempy in Windows with Debian and WSL
/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