[gdal-dev] Python (2.6.5) GDAL module will not install with easy_install

Allen Rongone arongone at aer.com
Tue May 11 08:44:58 EDT 2010


Hi Brice,

	When I download and untar gdal-1.7.1.tar.gz, there is no configure  
script to run.

Here is a directory listing of what I get after untarring:

[root at psd14 GDAL-1.7.1]# ls
build       fallback_build.bat  GDAL.egg-info   gdal.py   GNUmakefile   
osgeo   PKG-INFO    samples  setup.cfg   setup_cfg.bak
extensions  gdalconst.py        gdalnumeric.py  gdal.pyc  ogr.py        
osr.py  README.txt  scripts  setup.cfg~  setup.py


I modified setup.cfg to point to the location of gdal-config on my  
RHEL 5 system and ran:
python setup.py build
python setup.py install

However, now when I run python and try to import gdal it complains  
that there is no such module.


Arrgggghh!!!!


~ Allen


On May 6, 2010, at 12:47 PM, Brice Lambi wrote:

> Hi Allen,
>
> Are you compiling from source?  When I install gdal python I just go
> into the swig/python directory and run 'python setup.py install'.   
> This
> should work.  The steps I take:
>
> tar zxvf gdal-1.7.1.tar.gz
> cd gdal-1.7.1
> ./configure --prefix=/usr
> make
> make install #run as root
> cd swig/python
> python setup.py install #run as root
>
> Hope this helps.
>
> Cheers,
> Brice
>
>
> Allen Rongone wrote:
>> Hello All,
>>
>>    New here so don't beat me up to bad.
>>
>>    I'm trying to get the GDAL module to install on a Red Hat  
>> Enterprise
>> Linux 5.4 64-bit workstation running Python 2.6.5.
>>
>>    I have installed the setuptools 0.6c11 and am using easy_install
>>
>>    My gdal-config is in /usr/bin, however, when I run easy_install  
>> GDAL
>> it complains that it "Could not run gdal-config!!!" and then  
>> contiues on
>> complaining about a bunch of stuff not
>>    being declared.
>>
>>    I can not find the setup.py to edit and change the location of
>> gdal-config. easy_install must clean everything up if it fails.
>>
>>
>>
>>    Does anyone know how to get this to work or will we have to do
>> without GDAL in python?
>>
>> Thanks for any help,
>> Allen
>>
>> I've included everything I thought pertinent below:
>>
>>
>> [root at psd14 ~]# uname -a
>> Linux psd14.aer.com 2.6.18-164.15.1.el5 #1 SMP Mon Mar 1 10:56:08 EST
>> 2010 x86_64 x86_64 x86_64 GNU/Linux
>> [root at psd14 ~]# python
>> Python 2.6.5 (r265:79063, May  3 2010, 14:23:56)
>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
>> Type "help", "copyright", "credits" or "license" for more  
>> information.
>>>>>
>> KeyboardInterrupt
>>>>>
>> [root at psd14 ~]# which gdal-config
>> /usr/bin/gdal-config
>> [root at psd14 ~]# easy_install GDAL
>> Searching for GDAL
>> Reading http://pypi.python.org/simple/GDAL/
>> Reading http://www.gdal.org
>> Best match: GDAL 1.7.1
>> Downloading
>> http://pypi.python.org/packages/source/G/GDAL/ 
>> GDAL-1.7.1.tar.gz#md5=38b838d528b309a28a3aa24d4fcef3cd
>>
>> Processing GDAL-1.7.1.tar.gz
>> Running GDAL-1.7.1/setup.py -q bdist_egg --dist-dir
>> /tmp/easy_install-eKZHzW/GDAL-1.7.1/egg-dist-tmp-siVuDI
>> Could not run gdal-config!!!!
>> cc1plus: warning: command line option "-Wstrict-prototypes" is  
>> valid for
>> Ada/C/ObjC but not for C++
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> GDALDriverShadow_Rename(GDALDriverShadow*, const char*, const
>> char*)$(B!G(B:
>> extensions/gdal_wrap.cpp:3371: error:
>> $(B!F(BGDALRenameDataset$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(BCPLErr
>> GDALDatasetShadow_CreateMaskBand(GDALDatasetShadow*, int)$(B!G(B:
>> extensions/gdal_wrap.cpp:3744: error:
>> $(B!F(BGDALCreateDatasetMaskBand$(B!G(B was not declared in  
>> this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bchar**
>> GDALDatasetShadow_GetFileList(GDALDatasetShadow*)$(B!G(B:
>> extensions/gdal_wrap.cpp:3747: error: $(B!F(BGDALGetFileList$(B! 
>> G(B
>> was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(BGDALRasterBandShadow*
>> GDALRasterBandShadow_GetMaskBand(GDALRasterBandShadow*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4077: error: $(B!F(BGDALGetMaskBand$(B! 
>> G(B
>> was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> GDALRasterBandShadow_GetMaskFlags(GDALRasterBandShadow*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4080: error: $(B!F(BGDALGetMaskFlags$(B! 
>> G(B
>> was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(BCPLErr
>> GDALRasterBandShadow_CreateMaskBand(GDALRasterBandShadow*, int)$(B! 
>> G(B:
>> extensions/gdal_wrap.cpp:4083: error:
>> $(B!F(BGDALCreateMaskBand$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bvoid
>> GDALColorTableShadow_CreateColorRamp(GDALColorTableShadow*, int,  
>> const
>> GDALColorEntry*, int, const GDALColorEntry*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4147: error:
>> $(B!F(BGDALCreateColorRamp$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> ComputeProximity(GDALRasterBandShadow*, GDALRasterBandShadow*,  
>> char**,
>> int (*)(double, const char*, void*), void*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4306: error:
>> $(B!F(BGDALComputeProximity$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> RasterizeLayer(GDALDatasetShadow*, int, int*, OGRLayerShadow*, void*,
>> void*, int, double*, char**, int (*)(double, const char*, void*),
>> void*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4342: error:
>> $(B!F(BGDALRasterizeLayers$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> Polygonize(GDALRasterBandShadow*, GDALRasterBandShadow*,
>> OGRLayerShadow*, int, char**, int (*)(double, const char*, void*),
>> void*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4362: error: $(B!F(BGDALPolygonize$(B! 
>> G(B
>> was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> FillNodata(GDALRasterBandShadow*, GDALRasterBandShadow*, double, int,
>> char**, int (*)(double, const char*, void*), void*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4378: error: $(B!F(BGDALFillNodata$(B! 
>> G(B
>> was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> SieveFilter(GDALRasterBandShadow*, GDALRasterBandShadow*,
>> GDALRasterBandShadow*, int, int, char**, int (*)(double, const char*,
>> void*), void*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4394: error: $(B!F(BGDALSieveFilter$(B! 
>> G(B
>> was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> RegenerateOverviews(GDALRasterBandShadow*, int,  
>> GDALRasterBandShadow**,
>> const char*, int (*)(double, const char*, void*), void*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4408: error: invalid conversion from
>> $(B!F(BGDALRasterBandShadow*$(B!G(B to $(B!F(BGDALRasterBand* 
>> $(B!G
>> (Bextensions/gdal_wrap.cpp:4408: error:   initializing argument 1
>> of $(B!F(BCPLErr GDALRegenerateOverviews(GDALRasterBand*, int,
>> GDALRasterBand**, const char*, int (*)(double, const char*, void*),
>> void*)$(B!G
>> (Bextensions/gdal_wrap.cpp:4408: error: invalid conversion from
>> $(B!F(BGDALRasterBandShadow**$(B!G(B to $(B! 
>> F(BGDALRasterBand**$(B!G
>> (Bextensions/gdal_wrap.cpp:4408: error:   initializing argument 3
>> of $(B!F(BCPLErr GDALRegenerateOverviews(GDALRasterBand*, int,
>> GDALRasterBand**, const char*, int (*)(double, const char*, void*),
>> void*)$(B!G
>> (Bextensions/gdal_wrap.cpp: In function $(B!F(Bint
>> RegenerateOverview(GDALRasterBandShadow*, GDALRasterBandShadow*,  
>> const
>> char*, int (*)(double, const char*, void*), void*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4421: error: invalid conversion from
>> $(B!F(BGDALRasterBandShadow*$(B!G(B to $(B!F(BGDALRasterBand* 
>> $(B!G
>> (Bextensions/gdal_wrap.cpp:4421: error:   initializing argument 1
>> of $(B!F(BCPLErr GDALRegenerateOverviews(GDALRasterBand*, int,
>> GDALRasterBand**, const char*, int (*)(double, const char*, void*),
>> void*)$(B!G
>> (Bextensions/gdal_wrap.cpp:4421: error: invalid conversion from
>> $(B!F(BGDALRasterBandShadow**$(B!G(B to $(B! 
>> F(BGDALRasterBand**$(B!G
>> (Bextensions/gdal_wrap.cpp:4421: error:   initializing argument 3
>> of $(B!F(BCPLErr GDALRegenerateOverviews(GDALRasterBand*, int,
>> GDALRasterBand**, const char*, int (*)(double, const char*, void*),
>> void*)$(B!G
>> (Bextensions/gdal_wrap.cpp: In function
>> $(B!F(BGDALTransformerInfoShadow*
>> new_GDALTransformerInfoShadow(GDALDatasetShadow*,
>> GDALDatasetShadow*, char**)$(B!G(B:
>> extensions/gdal_wrap.cpp:4445: error:
>> $(B!F(BGDALCreateGenImgProjTransformer2$(B!G(B was not declared  
>> in
>> this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> GDALTransformerInfoShadow_TransformPoint__SWIG_0 
>> (GDALTransformerInfoShadow*,
>> int, double*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4456: error:
>> $(B!F(BGDALUseTransformer$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> GDALTransformerInfoShadow_TransformPoint__SWIG_1 
>> (GDALTransformerInfoShadow*,
>> double*, int, double, double, double)$(B!G(B:
>> extensions/gdal_wrap.cpp:4468: error:
>> $(B!F(BGDALUseTransformer$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(Bint
>> GDALTransformerInfoShadow_TransformPoints(GDALTransformerInfoShadow*,
>> int, int, double*, double*, double*, int*)$(B!G(B:
>> extensions/gdal_wrap.cpp:4550: error:
>> $(B!F(BGDALUseTransformer$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(BGDALDriverShadow*
>> IdentifyDriver(const char*, char**)$(B!G(B:
>> extensions/gdal_wrap.cpp:4661: error:
>> $(B!F(BGDALIdentifyDriver$(B!G(B was not declared in this scope
>> extensions/gdal_wrap.cpp: In function $(B!F(BPyObject*
>> _wrap_ReadDir(PyObject*, PyObject*)$(B!G(B:
>> extensions/gdal_wrap.cpp:5255: error: $(B!F(BVSIReadDir$(B!G(B  
>> was
>> not declared in this scope
>> error: Setup script exited with error: command 'gcc' failed with exit
>> status 1
>> [root at psd14 ~]#
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



More information about the gdal-dev mailing list