[GRASS-user] python scripts load error
Glynn Clements
glynn at gclements.plus.com
Wed Feb 16 19:55:18 EST 2011
Peter Tittmann wrote:
> i'm attempting to "import grass.script" in python unsuccessfully
> (ImportError: No module named grass.script) ive set the environment
> variables according to this
> http://grass.osgeo.org/wiki/GRASS_and_Python#General_guides on ubuntu
> x64 Natty. can anyone recommend a solution? i used 'which grass' to
> determine the GISBASE variable (/usr/bin/grass).
That's wrong. GISBASE needs to point to the root of the GRASS
installation directory, which contains everything *except* for the
startup script (typically in /usr/bin or /usr/local/bin). A typical
value for GISBASE is /usr/local/grass-6.4.0.
> grass.py exists at /usr/lib/grass64/etc/python/grass/lib/grass.py
In which case, GISBASE should probably be set to /usr/lib/grass64, and
PYTHONPATH should include /usr/lib/grass64/etc/python.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list