1

I need to install gdal 1.10 or greater to be compatible with python3 on ubuntu 12.04. The machine also has python2 installed.

I followed instructions here Error While installing GDAL in Ubuntu 12.04. This successfully installed gdal for python2.x but not python3. I tried the command sudo apt-get install gdal-bin python3-gdal but am greeted with the error "Unable to locate pacage python3-gdal"

I also tried sudo pip3 install gdal

How can I install gdal successfully for python3?

  • 1
    Is upgrading to 14.04 an option? Then you could use the python3-gdal package from the standard repo. – Kersten Oct 29 '15 at 17:46
  • This is not an option as the ubuntu server is shared – geoeye Oct 29 '15 at 18:48
  • I was able to upgrade the server and the command sudo apt-get install gdal-bin python3-gdal did the trick! – geoeye Nov 3 '15 at 16:39
1

UbuntuGIS contains GDAL 1.10.0-1 with Python3 bindings.

sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update

sudo apt-get install gdal-bin python3-gdal

You could also build GDAL from source with Python3 support but that would require installing the depending libraries (and solving quite some build issues while you're at it).

  • I get the error: Cannot access PPA (https://launchpad.net/api/1.0/~ubuntugis/+archive/ubuntugis-stable) to get PPA information, please check your internet connection my internet connection is working fine. I'm accessing the ubuntu server remotely from a windows machine, if that makes any difference (don't think so) – geoeye Oct 29 '15 at 18:48
  • My bad, I messed up the PPA link. Try the corrected version. – Kersten Oct 30 '15 at 6:34
  • Sorry for late answer but it worked! Thank you! – geoeye Nov 23 '15 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.