[GRASS-user] GRASS on Mac OS 10.8.3

William Kyngesburye woklist at kyngchaos.com
Tue Apr 9 17:04:09 PDT 2013


There was someone else with this problem, but I didn't have a solution then.  maybe this will help them.

GRASS (OS X) needs a Python compatible with the bundled wxPython.  So far this has been limited to 32bit, though the rest of GRASS can be 64bit.  So OS X has a wrapper that forces python to run 32bit, and the startup tries to find a suitable Python.

It's possible that it still somehow executes the Macports Python, and the Macports Python may be 64bit only, then you get the error about the wrong architecture (32bit vs 64bit).

The order for finding Python is:

GRASS_PYTHON
PATH
/Library/Frameworks (the python.org python)
system

Now that I look at it, when finding Python, it doesn't check the available architectures, so it's very possible to find the Macports Python (suspected 64bit only) in the PATH, then fail to run when it's needed.

Try setting GRASS_PYTHON in your .bash_profile to (exactly):

/usr/bin/pythonw2.6

On Apr 9, 2013, at 11:23 AM, Adam Dershowitz wrote:

> I figured out the problem and a temporary work around, that I figured I would let people know.  But, if anyone has  a better solution, I would love to hear it.
> The problem seems to be that I have macports installed, and there appears to be an issue with python versions, and where it is being found.  
> 
> I first tried using the acceptable macports way of changing to different versions of python, but these didn't help:
> sudo port select python python26
> sudo port select python python27-apple
> Etc, but these didn't allow either 6.4 or 7.0 to run.  
> 
> But, if I get rid of all my macports stuff by doing:
> Sudo mv /opt/local /opt/local_tmp 
> Then I can open either GRASS 6.4 or 7.0.  I can then move opt/local back and then either GRASS seems to work fine.  Even if I quit and restart the gui they are fine.  
> This was not a problem for me on OS 10.6 and earlier.  So, something is different about search paths and/or environmental variables.
> Renaming like that is not a viable long term solution, as I need macports stuff a bunch.  Any suggestions about how the application is searching and why it is not finding a good version?  Or maybe the real problem is that I don't have the correct port (or version) of something installed in Macports, and if I do then it might be that the macports version is fine, and would work.  I believe that there might have been a change between 10.6 and 10.8 related to 32 bit versus 64 bit being default builds, so could there be an issue with which version of wx, or some other library is being searched for?  
> 
> Any thoughts or guidance?  
> 
> -- Adam

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.



More information about the grass-user mailing list