[GRASS-user] GRASS on Mac OS 10.8.3

Adam Dershowitz adershowitz at exponent.com
Tue Apr 9 22:02:56 PDT 2013



On 4/9/13 6:02 PM, "William Kyngesburye" <woklist at kyngchaos.com> wrote:

>On Apr 9, 2013, at 7:37 PM, Adam Dershowitz wrote:
>
>> That did the job.
>> In my case it was actually in .profile.  I think that by default
>>Macports,
>> on recent systems, builds 64 bit.  But, to complicate things, I actually
>> have a "universal" build of python, but not wxPython.  My guess is that
>> the problem was actually with wx, not with python itself.
>> 
>> Thank you much! 
>
>Well, if you have a universal Python in Macports, then it should work
>because it will execute 32bit.  If you mean you have universal Python
>somewhere else, then Macports 32bit Python is probably found first.

I did mean that I built Python universal in macports.  Although the
macports wx is not universal (and fails to build that way)

>
>The problem IS python, not wx.  GRASS knows wx is 32bit only, it's just
>that Python somehow executes 64bit (ie from Macports).  wxPython has been
>limited to 32bit on OS X until very recently.  My GRASS 6.4.2 includes
>and the GUI only supports 32bit wxPython.  GRASS 6.4.3 has fixes in the
>GUI to support the development version of wxPython that can be 64bit on
>OS X, but I don't think Michael has updated yet.

But, I have found something odd.  Again, as the problem is solved, this is
not at all a big deal.  But, but just something interesting.
It seems that once I set GRASS_PYTHON (either in .profile or
.bash_profile) that it works.  But, if I then comment it out and run GRASS
again, it continues to work fine (6.4.2, or 7.0).  Furthermore, in the
terminal that GRASS opens, if I do:
which python, what shows is
/Applications/GRASS-6.4.app/Contents/MacOS/bin/python

And these environmental variables are set in that terminal
GRASS_PYTHON=python
GRASS_PYTHONWX=/usr/bin/pythonw2.6

So, it seems like once I set GRASS_PYTHON a single time, it then saves
that value and uses it, even if GRASS_PYTHON is not set the next time.
 

>
>Good to know that GRASS_PYTHON fixes the problem without fuss.
>
>Note: .bash_profile is the standard shell init file on OS X, at least for
>Terminal.  OS X Terminal is an oddball in the loading of init files.  On
>my OS X 10.7 Mac .profile is NOT loaded (it may have been loaded on
>earlier systems).  So it's a good idea to get into the habit of using
>.bash_profile, even if .profile happens to work for you.
>
>

That's what I have done now.

Again, thanks for the help.

--Adam



More information about the grass-user mailing list