[GRASS-user] Environment variables to use grass from python on windows

Hamish hamish_b at yahoo.com
Fri Jun 28 05:24:04 PDT 2013


Pierric wrote:

> Hence the Grass main folder is located in C:\Program Files (x86)\Quantum 
> GIS Lisboa\apps\grass\grass-6.4.2  
...
> Unfortunately when running the last line "import grass.script" , I get 
> an error message saying that grass library could not be found. I have tried 
> different things but I cant figure out what I am missing.

I believe the python library was formally introduced, and definitely refined,
after the 6.4.2 release. So the one that came with your copy of QGIS is too
old. Please try a recent nightly build of 6.4.3svn,
  http://wingrass.fsv.cvut.cz/grass64/
  http://grass.osgeo.org/download/software/ms-windows/

(and let us know how it goes, python scripts on Windows suffer from
filename extension confusion when multiple copies of Python are
installed by different programs, each of which wish to be associated
with ".py", and so any feedback that helps us navigate through that
maze is quite valuable, especially from anyone who knows the Python
on Windows quirks well)


Hamish



More information about the grass-user mailing list