TransWikia.com

Steps for installing new GDAL version for Python in Ubuntu 18.04

Geographic Information Systems Asked on September 25, 2021

If I’m installing the GDAL stock version from Ubuntu 18.04 then the installed version is 2.2 and I need at least 3.0.4 to better handle Sentinel 2 data. Is there a way to update GDAL to version 3.1.0?

One Answer

You can use Conda for this intent as 3.1 is available

conda search gdal --channel conda-forge

The recipe can be the following

conda create --name gdal_31 python=3.6
conda activate gdal_31
conda config --add channels conda-forge
conda install gdal libgdal
gdalinfo --version # Confirm GDAL command line version
python -c "import osgeo.gdal;print(osgeo.gdal.__version__)"
3.1.2 # Confirm "right" GDAL in Python
# Do your stuff here e.g running Python scripts using GDAL or command line

conda deactivate # Go away from the virtualenv when finished

Answered by ThomasG77 on September 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP