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

Michael Barton Michael.Barton at asu.edu
Thu Jul 27 20:13:24 PDT 2017


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

I went ahead and installed wxPython 4 to my system Python and recompiled. GRASS launches and runs fine, looking exactly like it does in wxPython 3, including the same bugs. But I'm not sure that it is actually running wxPython 4. When I try to test, I get odd errors (see below).

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.
>>> import wxversion
>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/__init__.py", line 45, in <module>
    from wx._core import *
  File "/Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_core.py", line 4, in <module>
    import _core_
ImportError: /Applications/GRASS-7.3.app/Contents/MacOS/etc/python/wx/_core_.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
>>>

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 6:34 PM, Anna Petrášová <kratochanna at gmail.com<mailto:kratochanna at gmail.com>> wrote:

On Thu, Jul 27, 2017 at 8:13 PM, Michael Barton <Michael.Barton at asu.edu<mailto:Michael.Barton at asu.edu>> wrote:
It seems that GRASS (at least GRASS for Mac) will only use the system
Python. If I set up an environment in which Anaconda python is default,
GRASS will not start and gives an error message that it will only run with
the system Python. I don't know where this is coming from. It doesn't seem
to be from the python_wrapper script. This will need to be changed if I am
to package Python with GRASS.

What exactly is the error? I know I was able to use GRASS_PYTHON
variable previously to set the python I needed.

Anna


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: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.public.asu.edu_-7Ecmbarton&d=DwIFaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=ejnQRWolrucufjW07P5RKvDkaAo__J6-niGuF5D7eNg&s=97LlCjf7C4a6iG9wGSVOYu1lQuVXSps_-yEnDAGKWIE&e= , https://urldefense.proofpoint.com/v2/url?u=http-3A__csdc.asu.edu&d=DwIFaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=ejnQRWolrucufjW07P5RKvDkaAo__J6-niGuF5D7eNg&s=-IglMTXE4z0Ek6alARnfLbHdyXb7iyo7bg3-Gf0Uyb8&e=















On Jul 27, 2017, at 1:33 PM, Anna Petrášová <kratochanna at gmail.com<mailto:kratochanna at gmail.com>> wrote:

On Thu, Jul 27, 2017 at 3:03 PM, Michael Barton <Michael.Barton at asu.edu<mailto:Michael.Barton at asu.edu>>
wrote:



On Jul 27, 2017, at 12:46 PM, Anna Petrášová <kratochanna at gmail.com<mailto:kratochanna at gmail.com>> wrote:

I think you can use pip to install it with whatever Python you use, at
least that's what works on Linux.


How do you specify which Python in pip?


It uses whichever Python is first on the path, you can find out with

which python

probably you can use also something like this:

https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_a_4910393_1058453&d=DwIFaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=MCkZA0y-uOGAo8gOeYPoP_uqc1lzXM6XCXuCQayAyS0&s=_vBpVdLmTTjrHrftXdNANYEvTAotd9_enwM-I1H_YFQ&e=


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:
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.public.asu.edu_-7Ecmbarton&d=DwIFaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=MCkZA0y-uOGAo8gOeYPoP_uqc1lzXM6XCXuCQayAyS0&s=9rsZ1tUV9snbiCH4rN8yrhhd4hDrfvamcPxF7y3cvRE&e=
,
https://urldefense.proofpoint.com/v2/url?u=http-3A__csdc.asu.edu&d=DwIFaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=MCkZA0y-uOGAo8gOeYPoP_uqc1lzXM6XCXuCQayAyS0&s=8dy6hAPGI8vce9HOn68hYqtyg7hzPG5nT_Nt0fQIGCk&e=














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


More information about the grass-dev mailing list