[Distutils] How to add GDAL as a dependency to a Python package

Luí­s de Sousa luis.de.sousa at protonmail.ch
Wed Apr 13 03:02:24 EDT 2016

Thank you for the reply Chris.

I just tried to install pygdal directly from PiPY on a stock Ubuntu distribution and it fails [0], even if I supposedly have all the necessary headers installed.

I will try easier ways before going with Conda, but thanks for the suggestion in any case.


[0] http://pastebin.com/gzrimLvB

Sent from [ProtonMail](https://protonmail.ch), encrypted email based in Switzerland.

-------- Original Message --------
Subject: Re: [Distutils] How to add GDAL as a dependency to a Python package
Local Time: April 12, 2016 6:45 PM
UTC Time: April 12, 2016 4:45 PM
From: chris.barker at noaa.gov
To: luis.de.sousa at protonmail.ch
CC: distutils-sig at python.org

setting gdal as a dependency is only going to work if one of these is true:

* There is a binary wheel on PyPi for gdal (which is very hard to do, though with teh manylinux effort, maybe there will be some day)

* the system on which you are trying to install is all set up to compile gdal -- which is a major effort, and indeed, I'm not sure is possible (I haven't looked)
- The GDAL source ships with the python bindings, so the usual thing is for gdal itself and the pyton bindings to all get compiled and installed at once. I"m not srue that anyone has made a setup.py that will do that.

This kind of thing is exactly why conda exists -- python packages with complex non-python dependencies are not well handled by pip / pypi -- if I were you, I"d give it a try :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160413/da0d2ba8/attachment.html>

More information about the Distutils-SIG mailing list