[Gdal-dev] newbie: Python issues with gdal-1.4.0/VC8/Python24
Gregory, Matthew
matt.gregory at oregonstate.edu
Tue Jan 9 18:57:48 EST 2007
I'm trying to compile GDAL with Python support on Windows using Visual C++ 8 (2005) and am banging my head against the wall.
In the nmake.opt file, I have set the following variables:
GDAL_HOME = C:\gdal-1.4.0
PY_INST_DIR = $(GDAL_HOME)\pymod
PYDIR = C:\Python24
VCDIR = C:\Program Files\Microsoft Visual Studio 8\VC
When I build, everything goes fine and I get what I would expect in the pymod directory (_gdal.dll, _gdal.exp, _gdal.lib). I then include C:\Python24 in my PATH and C:\gdal-1.4.0\pymod in my PYTHONPATH.
When I try to run a sample Python script (e.g. "python rgb2pct.py"), I get the error message:
Traceback (most recent call last):
File "rgb2pct.py", line 50, in ?
import gdal
File "C:\gdal-1.4.0\pymod\gdal.py", line 191, in ?
import _gdal
ImportError: DLL load failed: The specified module could not be found.
I've compared _gdal.dll to the one found in a version that works (ie. the FWTools distribution) using "dumpbin /exports" and they look to have the same symbols. This may be a naïve way of comparison, I'm guessing.
Note that my Python distribution came shipped with ArcGIS 9.2. I don't think that would cause any issues, though.
I'm likely doing something very stupid, but I'm stumped.
thanks, matt
Matt Gregory
Faculty Research Assistant
Department of Forest Science
Oregon State University
Phone : (541) 758-7778
Email : matt.gregory at oregonstate.edu
More information about the Gdal-dev
mailing list