Finally I managed to install gdal 1.6.3 using a debien package (and I have to install libgdal1-1.6.0 before ). But I read from <br><a href="http://trac.osgeo.org/gdal/wiki/GdalOgrInPython">http://trac.osgeo.org/gdal/wiki/GdalOgrInPython</a><br>
saying that from version 1.7.0, python 3 is needed. <br><br>thanks et cheers,<br><br>Chao<br><br><div class="gmail_quote">2012/5/27 Chao YUE <span dir="ltr"><<a href="mailto:chaoyuejoy@gmail.com" target="_blank">chaoyuejoy@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br><br>I am new to gdal and when I try to install it on my ubuntu computer, I have the following error. It occurs either with pip or with manual python setup.py build. <br>
could anyone give me some clue on this problem? thanks in advance. <br>
<br>Chao<br><br clear="all">chaoyue@chaoyue-Aspire-4750:~/python/python_lib/build/gdal$ sudo python setup.py install<br>[sudo] password for chaoyue: <br>running install<br>Checking .pth file support in /usr/local/lib/python2.7/dist-packages/<br>
/usr/bin/python -E -c pass<br>TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files<br>running bdist_egg<br>running egg_info<br>writing GDAL.egg-info/PKG-INFO<br>writing top-level names to GDAL.egg-info/top_level.txt<br>
writing dependency_links to GDAL.egg-info/dependency_links.txt<br>Traceback (most recent call last):<br> File "setup.py", line 267, in <module><br> ext_modules = ext_modules )<br> File "/usr/lib/python2.7/distutils/core.py", line 152, in setup<br>
dist.run_commands()<br> File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands<br> self.run_command(cmd)<br> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command<br>
cmd_obj.run()<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 73, in run<br> self.do_egg_install()<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 93, in do_egg_install<br>
self.run_command('bdist_egg')<br> File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command<br> self.distribution.run_command(command)<br> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command<br>
cmd_obj.run()<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 172, in run<br> self.run_command("egg_info")<br> File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command<br>
self.distribution.run_command(command)<br> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command<br> cmd_obj.run()<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 179, in run<br>
self.find_sources()<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 254, in find_sources<br> mm.run()<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 308, in run<br>
self.add_defaults()<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 332, in add_defaults<br> sdist.add_defaults(self)<br> File "/usr/lib/python2.7/dist-packages/setuptools/command/sdist.py", line 191, in add_defaults<br>
build_ext = self.get_finalized_command('build_ext')<br> File "/usr/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command<br> cmd_obj.ensure_finalized()<br> File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized<br>
self.finalize_options()<br> File "setup.py", line 164, in finalize_options<br> self.gdaldir = self.get_gdal_config('prefix')<br> File "setup.py", line 144, in get_gdal_config<br> return fetch_config(option)<br>
File "setup.py", line 97, in fetch_config<br> raise gdal_config_error, e""")<br> File "<string>", line 4, in <module><br>__main__.gdal_config_error: [Errno 2] No such file or directory<span class="HOEnZb"><font color="#888888"><br>
<br>-- <br><div>***********************************************************************************</div>
<div>Chao YUE<br>Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)<br>UMR 1572 CEA-CNRS-UVSQ<br>Batiment 712 - Pe 119<br>91191 GIF Sur YVETTE Cedex</div>
<div>Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16<br></div>
<div>************************************************************************************</div><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div>***********************************************************************************</div>
<div>Chao YUE<br>Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)<br>UMR 1572 CEA-CNRS-UVSQ<br>Batiment 712 - Pe 119<br>91191 GIF Sur YVETTE Cedex</div>
<div>Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16<br></div>
<div>************************************************************************************</div><br>