[FWTools] How can I use my own python instead of the default python in fwtools windows bundle?

Frank Warmerdam fwarmerdam at gmail.com
Fri Jun 10 09:18:48 EDT 2005

On 6/10/05, Litao Wei <wlt008 at gmail.com> wrote:
> I want to test fwtools and PCL on my windows. The PCL documents say for
> install FWTools, just need simply add its Python
> module path ('FWToolsx.x.x\pymod') to your PYTHONPATH environment
> variable. But I don't know where to add, for I use Zope bundled python,
> there is no register entry for PYTHONPATH.


Generally speaking FWTools isn't intended to be easiliy usable
in a mix-and-match sort of way.  You may be able to do it, but you
will need to be pretty savvy about setting up the environment. 

I imagine you can just set a global system PYTHONPATH environment
on your system.  Are you working on Win32 or Linux?  It's hard for us
to help with at least this much information. 

Another alternative is to add the pymod directory to your python path
from within the python scripts.  Put something like this at the front
of scripts using FWTools services:

import sys
import gdal

Also, keep in mind that the GDAL/OGR python bindings need to be
able to find the actual GDAL DLL and all it's dependencies.  This likely 
means adding the FWTools\bin directory to your PATH (not PYTHONPATH).

Good luck,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the FWTools mailing list