Miniconda with gdal install
This example demonstrates a command-line recipe for setting up a Python environment with GDAL, the geospatial data abstraction library, using Miniconda. It shows how to configure conda with the conda-forge channel and strict priority, create a virtual environment named `gdal_latest` with Python 3.9, and install both `gdal` and `libgdal` packages. The process relies on conda commands such as `conda config`, `conda create`, `conda activate`, and `conda deactivate` to manage the environment and its dependencies.
AI-generated descriptionMiniconda 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