[gdal-dev] Python documentation help

Lucena, Ivan ivan.lucena at pmldnet.com
Wed Dec 5 11:48:49 EST 2007


Howard,

In order to get GDAL Python to work on Windows XP I followed those steps:

- Install Swigwin-1.3
- Install Numpy over Python 2.4
- Set "SWIG" to the Swigwin-1.3 swig executable
- Set PY_DIR to the folder where Pyhton.exe resides
- Recompile GDAL using VC7, "nmake -f makefile.vc"
- cd swig, and run "nmake /f makefile.vc python"
- cd python
- uncomment the win32 related line in setup.cfg
- run "python.exe setup.py bdist_wininst"
- cd dist, and run "GDAL-1.5.0.a.dev.win32-py2.4.exe"

I tested it on PythonWin IDE:

Note: I tried the old import and the new one just to make sure.

 >>> import gdal
Traceback (most recent call last):
   File "<interactive input>", line 1, in ?
   File "C:\Progra~1\Python24\Lib\site-packages\gdal.py", line 6, in ?
     import _gdal
ImportError: No module named _gdal
 >>> from osgeo import gdal
 >>> gdal.AllRegister()
 >>> _

Everything works just fine. You guys did a great job!

Ivan



Ivan Lucena, Research Associate, Ms.
Clark University / Clark Labs
ilucena at clarku.edu
+1.508.849.2319
--
"Like kids, it comes a time when your software must be mature enough to 
go out and live in another environment and digest other kind of data"




Howard Butler wrote:
> All,
> 
> I have drastically restructured our GDAL Python wiki page to be a 
> reStructured text formatted document that I would like to synchronize 
> with the ./swig/python/README.txt as part of the GDAL 1.5. release.  As 
> people beta test the 1.5 release, I would like to ask that you add notes 
> or sections to the document that describe trip-ups that may have been 
> missed.  Also, more examples (even some simple code examples) would be 
> excellent additions.  If anyone has time to work on this, it would be 
> greatly appreciated.
> 
> http://trac.osgeo.org/gdal/wiki/GdalOgrInPython
> 
> As we build up to the release, I will continue to sync this wiki page 
> with the file in subversion, but the wiki page should be considered "the 
> master" until the 1.5 release is made.
> 
> Crowd-sourced GDAL documentation here we come!
> 
> Thanks,
> 
> Howard
> _______________________________________________
> 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