[GRASS-windows] WinGRASS Python 2.7

Johannes Radinger JRadinger at gmx.at
Wed Aug 31 05:07:05 EDT 2011


Hi,

-------- Original-Nachricht --------
> Datum: Tue, 30 Aug 2011 20:35:30 +0100
> Von: Glynn Clements <glynn at gclements.plus.com>
> An: "Johannes Radinger" <JRadinger at gmx.at>
> CC: grass-windows at lists.osgeo.org, grass-user at lists.osgeo.org
> Betreff: Re: [GRASS-windows] WinGRASS Python 2.7

> 
> Johannes Radinger wrote:
> 
> > because I want to use some pythonscripts that only work (or can be
> > installed) with Python 2.7, I'd like to couple my WinGRASS 6.4.1
> > with my Python2.7 installation instead of the GRASS-Python.
> > 
> > So my Setup:
> > * Windows 7
> > * WinGRASS 6.4.1 (most recent)
> > * Python 2.7
> > 
> > Following Environemtal Variables are set:
> > * PATH includes C:\Python27
> > * GRASS_PYTHON includes C:\Python27\python.exe
> > * PYTHONPATH includes %GISBASE%\etc\python
> > 
> > 
> > So my questions:
> > 1) How can I check which Pyhton is in use by WinGrass?
> 
> The wx GUI uses GRASS_PYTHON. To check which version is being used:
> 
> 1. Start the wx GUI
> 2. Bring up Windows' Task Manager
> 3. Switch to the Processes tab
> 4. Find the python.exe (or pythonw.exe) process in the list
> 5. Right click on the entry for the process
> 6. Choose "Open File Location" from the menu

So I checked the python.exe*32 (the only python that is running) in the taskmanager (after booting and starting the wxGUI). And although
GRASS_PYTHON is set in the environmental variables to C:\Python27\python.exe, the python which is used is still the GRASS-Python in
the path C:\Programm Files(x64)\GRASS 6.4.1\extrabin\python.exe

So what causes this? How can I proceed? What should I check?

PYTHONHOME is NOT set!

Any suggestion what causes the problem?

/Johannes

> 
> Python scripts which are "executed" from a command prompt will use
> whichever Python version is associated with the .py file extension.
> 
> Scripts which are executed from bash will use the script's "#!" line. 
> If you use "#!/usr/bin/env python", it will use the first python.exe
> in the path. You can check which version of Python is used by adding
> e.g. "print sys.version" to the script.
> 
> > 2) Is there anything else I've to set?
> 
> Ensure that PYTHONHOME is /not/ set.
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone


More information about the grass-windows mailing list