[GRASS-user] gui wxPython2.5 and 2.6 problem on Mac, Path?
William Kyngesburye
woklist at kyngchaos.com
Wed Mar 23 10:29:21 EDT 2011
GRASS on the Mac uses Python from a wrapper. This is because wxPython (for the GUI) can't run 64bit, but that is what Python does on OSX 10.6. So the wrapper forces it to run 32bit. The GRASS startup will usually find the correct Python for the wrapper to use. It will look in the order (always looking for the version it was compiled with):
GRASS_PYTHON
shell PATH
python.org Python in /Library/Frameworks
system Python
That /Applications python .command is probably for the python.org Python, which you must have installed at some time. This will put the python.org Python before the system Pyhon in the shell PATH.
What does the rest of the startup output in the Terminal say? (scroll up to see it) It should identify which Python it found.
There should not be any problem with GRASS and Python 2.6, and the python version should agree with what wxPython was made for, which looks like 2.6 for yours.
Maybe something broke in a recent revision of GRASS?
On Mar 23, 2011, at 8:21 AM, Johannes Radinger wrote:
> Hej...
>
> because I had problems running a python script and the /usr/bin/env... I was looking which pyhton is in /usr/bin... there I found Python2.6 and Python2.5....It seems that they were probably in the wrong order in PATH i thought....in the Python2.6 folder in my Application ther was a file called "Update Shell Profile.command" and it was recommended in a forum to run that...
> ...so and now a big problem started: My wxpython gui isn't working anymore. wxpython, numpy and scipy are installed modules on my mac, but I get following error when I start GRASS GIS6.5:
>
> Welcome to GRASS 6.5.svn (2011)
> GRASS homepage: http://grass.osgeo.org/
> This version running thru: Bash Shell (/bin/bash)
> Help is available with the command: g.manual -i
> See the licence terms with: g.version -c
> Start the GUI with: g.gui wxpython
> When ready to quit enter: exit
>
> GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
> Launching 'wxpython' GUI in the background, please wait ...
> GRASS 6.5.svn (Treene_location):~ > g.gui wxpython
> Launching 'wxpython' GUI in the background, please wait ...
> GRASS 6.5.svn (Treene_location):~ > Traceback (most recent call last):
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1630, in <module>
> Traceback (most recent call last):
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1630, in <module>
> sys.exit(main())
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1623, in main
> sys.exit(main())
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1623, in main
> app = GMApp(workspaceFile)
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1522, in __init__
> app = GMApp(workspaceFile)
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1522, in __init__
> wx.App.__init__(self, False)
> File "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7978, in __init__
> wx.App.__init__(self, False)
> File "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7978, in __init__
> self._BootstrapApp()
> self._BootstrapApp()
> File "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7552, in _BootstrapApp
> File "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.6/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 7552, in _BootstrapApp
> return _core_.PyApp__BootstrapApp(*args, **kwargs)
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1540, in OnInit
> return _core_.PyApp__BootstrapApp(*args, **kwargs)
> File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1540, in OnInit
> timeout = 2000, parent = None, id = wx.ID_ANY)
> TypeError: __init__() got an unexpected keyword argument 'extrastyle'
> timeout = 2000, parent = None, id = wx.ID_ANY)
> TypeError: __init__() got an unexpected keyword argument 'extrastyle'
>
>
> it seems that there is a problem that i have two versions of python and maybe GRASS can work only with python2.5... I tried a recompilation of GRASS, but still fail...
>
> it is not a problem of GRASS itself but more of my set environemtal variables in the Path i think, but I don't know...
>
> how can I check that, how can I set the Path correctly?
>
> ..how can I solve that problem?
>
> /johannes
>
>
> --
> NEU: FreePhone - kostenlos mobil telefonieren und surfen!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Theory of the Universe
There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.
-Hitchhiker's Guide to the Galaxy 2nd season intro
More information about the grass-user
mailing list