[GRASS-windows] Fwd: WinGRASS installation and addtional python modules

Glynn Clements glynn at gclements.plus.com
Tue May 17 08:00:58 EDT 2011


Johannes Radinger wrote:

> Probably that is better for the wingrass mailing list then for the
> general grass-user list:
> 
> I wrote a python script for grass involving several python modules
> (numpy, scipy and matplotlib) and I tested it successfully on my mac
> osx (GRASS GIS 6.5, Python 2.6.6 and other modules).
> 
> Now I'd like to test it on a Windows 7 machine and need to install all
> the necessary python modules. So my question: Which python version
> (2.6.6 or 2.7) should be installed and which version of wingrass
> (script should work on all recent versions of grass). Will Wingrass
> use the before installed python (either 2.6.6 or 2.7) and its
> addtional modules?
> 
> What is the simpliest way to make this combination working? Just
> install everthing?

Use whichever version of Python you want, but be sure to eliminate all
traces of the Python version which gets bundled with WinGRASS
(including removing any references from environment variables set by
Init.bat).

Once you have a proper Python installation, the only connections
between GRASS and Python should be:

1. GRASS_PYTHON should be set to the complete path to the Python
interpreter. This is used for running wxPython code, e.g. from g.gui
or when running a command without arguments (or with the --ui flag)
displays a parameter dialog.

2. PYTHONPATH needs to contain %GISBASE%\etc\python so that e.g. 
"import grass.script" can find the module.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-windows mailing list