[FWTools] Using Fwtools with python 2.4
Moreau, Jean-Sebastien
jmoreau at nrcan.gc.ca
Tue Mar 7 08:59:38 EST 2006
Hi list,
I'm tring to use the the gdal python binding in fwtools from python 2.4.
In order to do this I've modified the setfwenv.bat so that the python use
would be the python2.4 install on my machine:
@echo off
REM
==========================================================================
REM This script is normally invoked from FWTools\setfw.bat
REM The FWTOOLS_OVERRIDE environment variable allows you to set a the
REM install directory in your environment, instead of having to edit
REM setfw.bat. This is especially useful if you frequently upgrade to new
REM versions, and don't want to have to edit the file every time.
IF exist "%FWTOOLS_OVERRIDE%\setfw.bat" SET FWTOOLS_DIR=%FWTOOLS_OVERRIDE%
IF exist "%FWTOOLS_DIR%\setfw.bat" goto skip_err
echo FWTOOLS_DIR not set properly in setfw.bat, please fix and rerun.
goto ALL_DONE
:SKIP_ERR
REM PATH=%FWTOOLS_DIR%\bin;%FWTOOLS_DIR%\python;%PATH%
PATH=%FWTOOLS_DIR%\bin;D:\Apps\Python24;%PATH%
set PYTHONPATH=%FWTOOLS_DIR%\pymod
set PROJ_LIB=%FWTOOLS_DIR%\proj_lib
set GEOTIFF_CSV=%FWTOOLS_DIR%\data
set GDAL_DATA=%FWTOOLS_DIR%\data
set GDAL_DRIVER_PATH=%FWTOOLS_DIR%\gdal_plugins
REM set CPL_DEBUG=ON
:ALL_DONE
Unfortunatly, when I try to load the gdal module from the python shell, I
get the following message:
----------------------------------------------------------------------------
--
>>> import gdal
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "D:\Apps\FWTOOL~1.0A7\pymod\gdal.py", line 191, in ?
import _gdal
ImportError: Module use of python23.dll conflicts with this version of
Python.
----------------------------------------------------------------------------
---
Is there a way to work things around or do I really need to build gdal from
source?
Thanks in advance!
Jean-Sébastien Moreau
Centre d'information topographique de Sherbrooke
Ressources naturelles Canada
2144, rue King Ouest, bureau 010
Sherbrooke (Québec) J1J 2E8
Tél. : (819) 564-5600-ext 295 Téléc. : (819) 564-5698
Courrier électronique : jmoreau at RNCan.gc.ca
Centre for Topographic Information of Sherbrooke
Natural Resources Canada
2144, King Street West, Suite 010
Sherbrooke, Quebec J1J 2E8
Tel.: (819) 564-5600-ext 295 Fax: (819) 564-5698
E-mail: jmoreau at NRCan.gc.ca
More information about the FWTools
mailing list