[Gdal-dev] NumPy supported in 1.4.0?

William Kyngesburye woklist at kyngchaos.com
Fri Feb 9 21:55:20 EST 2007

I'm finally getting around to updating my GDAL framework to use the  
ng python + numpy + python 2.5.

My guess is that your shell PATH is not set right.  The way the  
python setup.py is run is to depend on python being in your PATH.   
For the Mac Python installer, you need to do one of two things -  
either install the Profile Changes part, which adds the python  
framework/bin to your PATH in your .bash_profile, or install the Unix  
Tools part, which adds symlnks to /usr/local/bin (but you should make  
sure you have /usr/local/bin in your PATH then).

If neither is done, 'python' will run the system's python 2.3.

One thing I noticed for OSX - this won't correctly build for the  
framework build option for OSX.  Because the framework option renames  
the built library on install, gdalmodule.so won't be correctly linked  
when installed.

So, after building, gdalmodule would have to have it's linking  
changed when it is installed:

install_name_tool -change $(INST_LIB)/libgdal.$ 

that's just an example, I'm not sure exactly what it would be.  This  
could be done in the makefile, right after setup.py is run, or during  

On Feb 9, 2007, at 10:03 AM, Philip Riggs wrote:

> I just realized the problem. I'm using numpy with Python2.5 and the  
> install is defaulting to the Mac's Python2.3 (with no numpy). Sorry  
> I didn't catch this sooner.
> Philip
> On Feb 8, 2007, at 8:21 PM, Howard Butler wrote:
>> Philip,
>> It appears that you need to install the numpy header files or  
>> GDAL's setup.py can't find them.  Are you using them from a  
>> package, or did you install them yourself with 'python setup.py  
>> install'?  GDAL's setup.py attempts to infer the location of the  
>> include files by searching around a little bit.  It's possible  
>> that this searching isn't very smart.
>> Howard

William Kyngesburye <kyngchaos at kyngchaos.com>

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."

- Marvin

More information about the Gdal-dev mailing list