[FWTools] Using Python ogr module in FWTools Shell

David Fawcett david.fawcett at gmail.com
Sat Oct 21 23:31:51 EDT 2006


I am trying to use the Python ogr module in the FWTools shell.

I can type 'python' and then 'import ogr' and I don't get any errors

but if I try to run a script called hw.py at the FWTools command prompt, I
get the below error.

The contents of hw.py are:

import os
import ogr

print "hello world"

The error is:

C:\>hw.py
Traceback (most recent call last):
  File "C:\hw.py", line 2, in ?
    import ogr
  File "C:\PROGRA~1\FWTOOL~1.5\pymod\ogr.py", line 244, in ?
    import _gdal
ImportError: Module use of python23.dll conflicts with this version of
Python.

Do I have to create/modify any environment variables?

I do also have ActiveState Python 2.4 on this machine.  My goal is to be
able to run Python scripts containing the FW modules from the FWTools shell
without screwing up an ArcDesktop install.

Thanks,

David.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20061021/b05659c8/attachment.html


More information about the FWTools mailing list