Skip to content

Instantly share code, notes, and snippets.

@ThomasG77
Created September 24, 2022 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThomasG77/40a9f033131c9b49fe70b22a5f9c701a to your computer and use it in GitHub Desktop.
Save ThomasG77/40a9f033131c9b49fe70b22a5f9c701a to your computer and use it in GitHub Desktop.
Miniconda with gdal install

Miniconda install recipe for GDAL

Take miniconda from https://docs.conda.io/en/latest/miniconda.html#latest-miniconda-installer-links and execute either the sh file or the pkg file

Add channel for GDAL

conda config --add channels conda-forge
conda config --set channel_priority strict

Create virtualenv à la "conda" style

conda create --name gdal_latest python=3.9

Activate env and install gdal

conda activate gdal_latest
conda install gdal libgdal

Run your command here or your python script

Then when finished, do

conda deactivate

Now only need to do to have a working gdal + python gdal env with

conda activate gdal_latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment