<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Sorry if my message was not clear Moritz.
<div class=""><br class="">
</div>
<div class="">I showed the output of a non-GRASS terminal window, just to show that the GRASS_PYTHON environmental variable was indeed set. I set it in .profile, sourced .profile, and then launched GRASS because GRASS looks for Python when it launches (or at
least that is what the start up message indicates).</div>
<div class=""><br class="">
</div>
<div class="">But GRASS does not recognize GRASS_PYTHON set at the system level. Not sure why this is. It seems that setting it at the system level DOES embed it into the ~/.grass7/rc file. But again, this seems to have no effect on GRASS at launch, where the
default system Python is hard coded somewhere. </div>
<div class=""><br class="">
</div>
<div class="">Setting it from the GRASS terminal is not helpful if my goal is to bundle Python with GRASS inside the Mac app. The reason for doing this is to ensure a clean working environment for all Mac users, without having to download and install extra
pieces of the correct version, and to avoid the issue where Mac SIP keeps GRASS from running. </div>
<div class=""><br class="">
</div>
<div class="">Michael<br class="">
<div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class="">
____________________</div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">C. Michael Barton</font></div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">Director, Center for Social Dynamics & Complexity </font></div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">Professor of Anthropology, School of Human Evolution & Social Change</font></div>
<div class=""><font face="Helvetica" size="3" class="">Head, Graduate Faculty in Complex Adaptive Systems Science</font></div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">Arizona State University</font></div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<font face="Helvetica" size="3" class=""><font class="">voice: </font><font class="">480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)</font><br class="">
<font class="">fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)</font><br class="">
</font>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">www: <a href="http://www.public.asu.edu/~cmbarton" class="">
http://www.public.asu.edu/~cmbarton</a>, <a href="http://csdc.asu.edu" class="">http://csdc.asu.edu</a></font></div>
<br class="">
</div>
<br class="">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 28, 2017, at 5:27 AM, Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be" class="">mlennert@club.worldonline.be</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">On 28/07/17 06:19, Michael Barton wrote:<br class="">
<blockquote type="cite" class="">Tried that and it seems to be ignored too. Here is the output from a terminal in the shell (outside GRASS):<br class="">
Last login: Thu Jul 27 22:04:37 on ttys001<br class="">
CMB-MacBook-Pro:~ cmbarton$ echo $GRASS_PYTHON<br class="">
/Applications/anaconda/bin/python<br class="">
This should make anaconda python (2.7.13) the default.<br class="">
But here is the output from a GRASS terminal:<br class="">
GRASS 7.3.svn (nc_spm_08_grass7):~ > echo $GRASS_PYTHON<br class="">
python<br class="">
</blockquote>
<br class="">
How and where did you set GRASS_PYTHON ? I'm not an expert in MacOSX, but in GNU/Linux if I set 'export GRASS_PYTHON=SomeOtherPython' in one terminal, but launch GRASS in the second terminal, GRASS_PYTHON is not set at GRASS startup and is thus set to 'python'
by default.<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">GRASS 7.3.svn (nc_spm_08_grass7):~ > python<br class="">
Python 2.7.10 (default, Feb 7 2017, 00:08:15)<br class="">
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin<br class="">
Type "help", "copyright", "credits" or "license" for more information.<br class="">
>>><br class="">
Also:<br class="">
GRASS 7.3.svn (nc_spm_08_grass7):~ > echo $GRASS_PYTHONWX<br class="">
/usr/bin/pythonw2.7<br class="">
This environmental variable is set inside GRASS somewhere. It does not show up in the shell outside GRASS.<br class="">
It GRASS ignoring the environmental variable setting for some reason. Is there something hardwired in that insists on looking for Python in /usr/bin?<br class="">
</blockquote>
<br class="">
Launching the 'python' binary in the command line does not interact in any way with the GRASS_PYTHON variable. If you launch 'python', it will launch the first python executable found in PATH.<br class="">
<br class="">
If you want to see if GRASS_PYTHON correctly runs the python you wanted, then run '$GRASS_PYTHON'.<br class="">
<br class="">
For example:<br class="">
<br class="">
export GRASS_PYTHON=/usr/bin/python3.6<br class="">
GRASS 7.3.svn (ETRS89_LAEA):/data/home/mlennert > python<br class="">
Python 2.7.13 (default, Jan 19 2017, 14:48:08)<br class="">
[GCC 6.3.0 20170118] on linux2<br class="">
Type "help", "copyright", "credits" or "license" for more information.<br class="">
>>><br class="">
GRASS 7.3.svn (ETRS89_LAEA):/data/home/mlennert > $GRASS_PYTHON<br class="">
Python 3.6.2 (default, Jul 17 2017, 13:39:29)<br class="">
[GCC 6.4.0 20170704] on linux<br class="">
Type "help", "copyright", "credits" or "license" for more information.<br class="">
<br class="">
There is a difference between calling 'python' from a command line in a terminal (even if the GRASS environnement variables are set, i.e. GRASS has been "started") and calling python using $GRASS_PYTHON as is done in the GRASS code.<br class="">
<br class="">
Moritz<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>