[gdal-dev] Python / ArcGIS / zlib conflict

Gregory, Matthew matt.gregory at oregonstate.edu
Mon Oct 27 19:21:18 EDT 2008


Hi all,

This is very tangentially a GDAL question, but something that's
affecting my python builds from trunk.  

I'm using Python 2.4.4 for reasons unrelated to GDAL.  Recently, I
upgraded to ArcGIS 9.3 and they've put zlib.dll into their bin directory
(usually C:\Program Files\ArcGIS\bin) and then added this to PYTHONPATH
on install.  Because PYTHONPATH is getting sourced before the core
Python directories (e.g. C:\Python24\DLLs), it's hitting the ArcInfo
zlib.dll (not a Python DLL) before hitting the Python zlib.pyd.  

When I run 'python setup.py install' from the swig/python directory, it
is no longer building the EGG in my site-packages folder because it's
not finding the correct zlib.  It is still copying over all of the
python modules and osgeo folder, but they are no longer in the EGG
(which was really nice!).  

I'm a relative newbie at Python; is there a way of having the
C:\Python24\DLLs folder being sourced first without adding it to my
PYTHONPATH?  It seems strange to me that ArcGIS would put the 'bin'
directory (that had all kinds of other stuff besides Python DLLs) into
PYTHONPATH, but I may not have a good grasp of the complexities here ...

thanks for advice,
matt


More information about the gdal-dev mailing list