[FWTools] running python scripts

Frank Warmerdam warmerdam at pobox.com
Fri Jan 12 16:30:07 EST 2007


Travis Kirstine wrote:
> I had both fwtools and gdal
>   compiled/installed on my machine (linux fc6) and was writing a few
>   scripts in python and everything seemed ok.  I then transfered the
>   scripts to a machine with only fwtools installed and attempted to run
>   the scripts and get cannot import gdal error.  Do I have to point the
>   the python that is install with the fwtools build (if so how do I do
>   that) or do I have to configure and install gdal from source.  I would
>   like just to use fwtools so I don't have to track down all libraries.

Travis,

To use the FWTools Python you need to setup your environment properly, or
invoke the "safe" binaries that do this for you.

So you could source the fwtools_env.sh (or .csh depending on shell) script
to setup the FWTools environment.

Or do something like:

  ~/FWTools-1.1.3/bin_safe/python your_script.py

The second is generally safer.

Best regards,
-- 
---------------------------------------+--------------------------------------
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    | President OSGeo, http://osgeo.org



More information about the FWTools mailing list