Skip to content

Instantly share code, notes, and snippets.

@jeremejazz
Last active May 20, 2025 01:00
Show Gist options
  • Save jeremejazz/02ea7626ec12a39a789f44db4a9ec49c to your computer and use it in GitHub Desktop.
Save jeremejazz/02ea7626ec12a39a789f44db4a9ec49c to your computer and use it in GitHub Desktop.

Revisions

  1. jeremejazz revised this gist May 20, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ Here are steps to install GDAL in Anaconda with python bindings.
    1. Download and Install [Anaconda](https://www.anaconda.com/products/individual) (or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) for minimal setup)
    - For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated.
    - For **Linux/Mac** you will be asked remove the automatic initialization, if you choose `yes`, you will need to manually run `conda init <shell>`.
    - *Note: After initialization, everytime you run the shell, conda will automatically activate the `base` environment by default. If you don't prefer having the base environment activated by default, run `conda config --set auto_activate_base false`*
    - *Note: After initialization, conda will automatically activate the `base` environment by default everytime you open the terminal. If you don't prefer this configuration, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this step if you want to only use `base` environment) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.11
  2. jeremejazz revised this gist May 20, 2025. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,9 @@
    Here are steps to install GDAL in Anaconda with python bindings.

    1. Download and Install [Anaconda](https://www.anaconda.com/products/individual) (or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) for minimal setup)

    - For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated.
    - For **Linux/Mac** you will be asked remove the automatic initialization, if you choose `yes`, you will need to manually run `conda init <shell>`.
    - *Note: After initialization, everytime you run the shell, conda will automatically activate the `base` environment by default. If you don't prefer having the base environment activated by default, run `conda config --set auto_activate_base false`*
    - For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated.
    - For **Linux/Mac** you will be asked remove the automatic initialization, if you choose `yes`, you will need to manually run `conda init <shell>`.
    - *Note: After initialization, everytime you run the shell, conda will automatically activate the `base` environment by default. If you don't prefer having the base environment activated by default, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this step if you want to only use `base` environment) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.11
  3. jeremejazz revised this gist May 20, 2025. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,10 @@
    Here are steps to install GDAL in Anaconda with python bindings.

    1. Download and Install [Anaconda](https://www.anaconda.com/products/individual) (or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) for minimal setup)
    For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. For **Linux/Mac** you will be asked remove the automatic initialization, if you choose `yes`, you will need to manually run `conda init <shell>`.
    *Note for Linux/Mac: After initialization, everytime you run the shell, conda will automatically activate the `base` environment by default. If you don't prefer having the base environment activated by default, run `conda config --set auto_activate_base false`*

    - For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated.
    - For **Linux/Mac** you will be asked remove the automatic initialization, if you choose `yes`, you will need to manually run `conda init <shell>`.
    - *Note: After initialization, everytime you run the shell, conda will automatically activate the `base` environment by default. If you don't prefer having the base environment activated by default, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this step if you want to only use `base` environment) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.11
  4. jeremejazz revised this gist May 20, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ For **Windows** a shortcut to anaconda prompt will be created in the start menu
    *Note for Linux/Mac: After initialization, everytime you run the shell, conda will automatically activate the `base` environment by default. If you don't prefer having the base environment activated by default, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this step if you want to only use `base` environment) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.9
    conda create -n geospatial python=3.11
    ```
    To list environments
    ```
  5. jeremejazz revised this gist May 20, 2025. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,9 @@
    Here are steps to install GDAL in Anaconda with python bindings.

    1. Download and Install [Anaconda](https://www.anaconda.com/products/individual) (or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) for minimal setup)
    For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. For **Linux/Mac** you will be asked to make conda automatically start whenever bash starts. You can also activate it manually later `conda init`.
    *Note for Linux/Mac: to prevent from conda from activating base everytime, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this if you want to only use base) Create a Conda environment with python.
    For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. For **Linux/Mac** you will be asked remove the automatic initialization, if you choose `yes`, you will need to manually run `conda init <shell>`.
    *Note for Linux/Mac: After initialization, everytime you run the shell, conda will automatically activate the `base` environment by default. If you don't prefer having the base environment activated by default, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this step if you want to only use `base` environment) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.9
    ```
  6. jeremejazz revised this gist May 19, 2025. No changes.
  7. jeremejazz revised this gist May 19, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ For **Windows** a shortcut to anaconda prompt will be created in the start menu
    *Note for Linux/Mac: to prevent from conda from activating base everytime, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this if you want to only use base) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.9
    conda create -n geospatial python=3.9
    ```
    To list environments
    ```
  8. jeremejazz revised this gist May 19, 2025. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,11 @@
    Here are steps to install GDAL in Anaconda with python bindings.

    1. Download and Install [Anaconda](https://www.anaconda.com/products/individual) (or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) for minimal setup)
    For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. In **Linux** you will be asked to make conda automatically start whenever bash starts. You can also activate it manually.
    For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. For **Linux/Mac** you will be asked to make conda automatically start whenever bash starts. You can also activate it manually later `conda init`.
    *Note for Linux/Mac: to prevent from conda from activating base everytime, run `conda config --set auto_activate_base false`*
    2. (*Optional*. You can skip this if you want to only use base) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.9
    conda create -n geospatial python=3.9
    ```
    To list environments
    ```
  9. jeremejazz revised this gist Jan 16, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -29,8 +29,8 @@ Should output something like this
    ```
    GDAL 3.4.1, released 2021/12/27
    ```
    Also for python bindings
    ```
    To test python bindings:
    ```python
    from osgeo import gdal
    print(gdal.__version__)
    ```
  10. jeremejazz created this gist Jan 16, 2022.
    36 changes: 36 additions & 0 deletions installing_gdal.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@

    # Installing GDAL with Anaconda

    Here are steps to install GDAL in Anaconda with python bindings.

    1. Download and Install [Anaconda](https://www.anaconda.com/products/individual) (or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) for minimal setup)
    For **Windows** a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. In **Linux** you will be asked to make conda automatically start whenever bash starts. You can also activate it manually.
    2. (*Optional*. You can skip this if you want to only use base) Create a Conda environment with python.
    ```
    conda create -n geospatial python=3.9
    ```
    To list environments
    ```
    conda env list
    ```
    To activate an environment
    ```
    conda activate geospatial
    ```
    3. Install [GDAL](https://anaconda.org/conda-forge/gdal)
    ```
    conda install -c conda-forge gdal
    ```
    4. Test your installation
    ```bash
    gdalinfo --version
    ```
    Should output something like this
    ```
    GDAL 3.4.1, released 2021/12/27
    ```
    Also for python bindings
    ```
    from osgeo import gdal
    print(gdal.__version__)
    ```