[GRASS-user] Re: [GRASS-windows] WinGRASS Python 2.7

Michael Barton michael.barton at asu.edu
Tue Sep 6 13:27:31 EDT 2011


I wonder if it is having trouble with your paths. They have spaces and "(" in them, and are not quoted.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu





On Sep 6, 2011, at 9:00 AM, <grass-user-request at lists.osgeo.org> <grass-user-request at lists.osgeo.org> wrote:

> Date: Tue, 06 Sep 2011 13:44:14 +0200
> From: "Johannes Radinger" <JRadinger at gmx.at>
> Subject: Re: [GRASS-user] Re: [GRASS-windows] WinGRASS Python 2.7
> To: Glynn Clements <glynn at gclements.plus.com>
> Cc: grass-user at lists.osgeo.org, grass-windows at lists.osgeo.org
> Message-ID: <20110906114414.92440 at gmx.net>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi again,
> 
> 
> sorry for posting again, but somehow I can't get it work to
> run GRASS GIS using my local Python 2.7 installation.
> See comments below:
> 
> -------- Original-Nachricht --------
>> Datum: Mon, 5 Sep 2011 01:57:38 +0100
>> Von: Glynn Clements <glynn at gclements.plus.com>
>> An: "Johannes Radinger" <JRadinger at gmx.at>
>> CC: grass-user at lists.osgeo.org, grass-windows at lists.osgeo.org
>> Betreff: Re: [GRASS-user] Re: [GRASS-windows] WinGRASS Python 2.7
> 
>> 
>> Johannes Radinger wrote:
>> 
>>> As recommended I did the changes.
>>> I just tried to first disable the PYTHONHOME and
>>> GRASS_PYTHON. The lines in the env.bat file are now:
>>> 
>>> rem Path to the python directory
>>> rem set PYTHONHOME=%GISBASE%\Python25
>>> rem if "x%GRASS_PYTHON%" == "x" set GRASS_PYTHON=python
>>> 
>>> is that correct?
>>> 
>>> 
>>> I tried at this step to start GRASS but it doesn't work
>>> anymore. Nothing is started!! So it seems that this isn't
>>> working! Maybe I have to set the path to python.org in the
>>> env.bat, but I don't know how the lines should look like.
>> 
>> For the GUI, setting e.g.:
>> 
>> 	set GRASS_PYTHON=c:\Program Files (x86)\Python27\pythonw.exe
>> 
>> should suffice.
> 
> So what I tried now were three different settings in the env.bat
> 
> 1)
> rem Path to the python directory
> set PYTHONHOME=%GISBASE%\Python25
> rem if "x%GRASS_PYTHON%" == "x" set GRASS_PYTHON=python
> set GRASS_PYTHON=C:\Program Files (x86)\Python27\pythonw.exe
> 
> in this case: GRASS is starting using the Python25
> 
> 2)
> rem Path to the python directory
> rem set PYTHONHOME=%GISBASE%\Python25
> rem if "x%GRASS_PYTHON%" == "x" set GRASS_PYTHON=python
> set GRASS_PYTHON=C:\Program Files (x86)\Python27\pythonw.exe
> 
> in this case: Nothing is started!
> 
> 3)
> rem Path to the python directory
> rem set PYTHONHOME=%GISBASE%\Python25
> rem if "x%GRASS_PYTHON%" == "x" set GRASS_PYTHON=python
> set C:\Program Files (x86)\Python27
> set GRASS_PYTHON=C:\Program Files (x86)\Python27\pythonw.exe
> 
> in this case: Nothing is started!
> 
> 
> Just to inform you why I need that: I wrote a .py script (including g.parser elements) which I want to call inside GRASS with "file.py" (like any other modules e.g. r.fuzzy etc.) The script is working (tested on my Mac using GRASS in combination with Python 2.7)! The script calls scipy which can only be used in combination with Python 2.6 or newer (so far as I remember).
> 
> 
> So hopefully this issue can be solved as soon as possible as I want to use the script also on my windows-office computer!!
> 
> Thank you
> Johannes
> 



More information about the grass-user mailing list