[Gdal-dev] Trying the python bindings in windows
Christopher Barker
Chris.Barker at noaa.gov
Sat Sep 22 17:37:19 EDT 2007
Ari Jolma wrote:
>> The "proper" way to do that is:
>> python setup.py install
> I guessed that and tried it:
>
> c:\dev\gdal\swig\python>python setup.py install
.....
> error: Python was built with Visual Studio 2003;
> extensions must be built with a compiler than can generate compatible
> binaries.
> Visual Studio 2003 was not found on this system. If you have Cygwin
> installed,
> you can try compiling with MingW32, by passing "-c mingw32" to setup.py.
> i.e., it ends in the same error as with build but giving -c mingw32 does
> not help here and the files are not really installed.
Well, the extension have to be compiled somehow. distutils can be used
to build a binary installer package, but if no ones done that, then
you've got to build it yourself.
By default, it looks for the VS2003 compiler that the "standard" python
was built with. With Python 2.5, extensions can also be build with
MingGW -- are you using 2.5?
Did you try:
python setup.py build --compiler=mingw32
If so, then something else is wrong. Using MingGW is described here:
python setup.py build --compiler=mingw32
and
http://boodebr.org/main/python/build-windows-extensions
NOTE: I haven't done this for GDAL recently, so it's possible that there
are other issues. However, if this doesn't work, then it's a bug --
let's get if figured out and fixed.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Gdal-dev
mailing list