[GRASS-dev] New attempt to update GRASS for Mac

Michael Barton Michael.Barton at asu.edu
Thu Jul 27 21:19:03 PDT 2017


Tried that and it seems to be ignored too. Here is the output from a terminal in the shell (outside GRASS):

Last login: Thu Jul 27 22:04:37 on ttys001
CMB-MacBook-Pro:~ cmbarton$ echo $GRASS_PYTHON
/Applications/anaconda/bin/python

This should make anaconda python (2.7.13) the default.

But here is the output from a GRASS terminal:

GRASS 7.3.svn (nc_spm_08_grass7):~ > echo $GRASS_PYTHON
python
GRASS 7.3.svn (nc_spm_08_grass7):~ > python
Python 2.7.10 (default, Feb  7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Also:

GRASS 7.3.svn (nc_spm_08_grass7):~ > echo $GRASS_PYTHONWX
/usr/bin/pythonw2.7

This environmental variable is set inside GRASS somewhere. It does not show up in the shell outside GRASS.

It GRASS ignoring the environmental variable setting for some reason. Is there something hardwired in that insists on looking for Python in /usr/bin?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu















On Jul 27, 2017, at 9:43 PM, Vaclav Petras <wenzeslaus at gmail.com<mailto:wenzeslaus at gmail.com>> wrote:



On Thu, Jul 27, 2017 at 11:13 PM, Michael Barton <Michael.Barton at asu.edu<mailto:Michael.Barton at asu.edu>> wrote:
I don't remember the exact wording. I had set up a conda virtual environment to force GRASS to compile and run with Anaconda Python and wxPython 4. When I launched GRASS (trunk), I got an error message that it would only run with a system Python. I thought that is weird.

Anyway, I tried setting GRASS_PYTHON to no avail. See below:

 g.gisenv get=GRASS_PYTHON
"/Applications/anaconda/bin/python"GRASS 7.3.svn (nc_spm_08_grass7):~ > python
Python 2.7.10 (default, Feb  7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

GRASS_PYTHON, is set, but it is still using system Python 2.7.10 instead of Anaconda Python 2.7.13



GRASS_PYTHON is actually an environmental variable (system driven, not by GRASS) , so you need to use:

export GRASS_PYTHON=/.../python  # set value
echo $GRASS_PYTHON  # get value

g.setenv changes the GRASS (environment) variables (aka "GIS env" or "GRASS variables").

https://grass.osgeo.org/grass72/manuals/variables.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__grass.osgeo.org_grass72_manuals_variables.html&d=DwMFaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=MD1Gik_Ukb94oqEn8xUzM4MmRA32DEGKDb9KLMTZOeY&s=EmOd1wDPGNwdhIbBwQvgT8t-sVeUaSNgAgSR9kFJRvM&e=>
https://grass.osgeo.org/grass72/manuals/g.gisenv.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__grass.osgeo.org_grass72_manuals_g.gisenv.html&d=DwMFaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=MD1Gik_Ukb94oqEn8xUzM4MmRA32DEGKDb9KLMTZOeY&s=yo3Xc65iMuqORBwABV8dM4gXsPwdzeI4P-Uqi_-XZZ0&e=>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20170728/c35499df/attachment-0001.html>


More information about the grass-dev mailing list