[GRASS-user] Is this a bug in 8.3.dev?

Rich,

It might have to do with where GRASS is looking for Python. If a different version of Python (2.7) got installed when you download the source code and compiled it, it is now looking for a matching numpy.

You can check in the GRASS launch script GRASS.sh to see where the GRASS_PYTHON variable is pointing.

Michael


C. Michael Barton
Associate Director, School of Complex Adaptive Systems (https://scas.asu.edu)
Professor, School of Human Evolution & Social Change (https://shesc.asu.edu)
Director, Center for Social Dynamics & Complexity (https://complexity.asu.edu)
Arizona State University
Tempe, AZ 85287-2701
USA

Executive Director, Open Modeling Foundation (https://openmodelingfoundation.github.io)
Director, Network for Computational Modeling in Social & Ecological Sciences (https://comses.net)

personal website: http://www.public.asu.edu/~cmbarton

On May 3, 2023, at 12:00 PM, grass-user-request@lists.osgeo.org wrote:

Date: Wed, 3 May 2023 11:18:37 -0700 (PDT)
From: Rich Shepard <rshepard@appl-ecosys.com>
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] Is this a bug in 8.3.dev?
Message-ID: <24cb2dc1-c1e1-e8ec-5db6-cabae5a9d3d9@appl-ecosys.com>
Content-Type: text/plain; format=flowed; charset=US-ASCII

I have python3-3.9.16 installed on Slackware64-15.0. I’m building from the
github dev source.

When I used d.mon start=wx0 grass told me it could not find a numpy for
python-2.7.x.

Anna suggested I add GRASS_PYTHON to ~/.bash_profile. I did and learned that
export GRASS_PYTHON=python3-3.9.16 wasn’t accepted by grass, neither was
export GRASS_PYTHON=python (which is an alias for python3). What seemed to
work was export GRASS_PYTHON=/usr/bin/python.

Starting grass to a location’s PERMANENT mapset, g.list type=vect tells me I
have a map named metro100 there.

Unfortunately, I cannot start a monitor:
d.mon start=wx0
GRASS metro100/PERMANENT:~ > File “/usr/local/grass83/gui/wxpython/mapdisp/main.py”, line 252
**args,
^
SyntaxError: invalid syntax
^C
GRASS metro100/PERMANENT:~ > d.mon start=wx1
GRASS metro100/PERMANENT:~ > File “/usr/local/grass83/gui/wxpython/mapdisp/main.py”, line 252
**args,
^
SyntaxError: invalid syntax

Is this a bug or something I’ve done here?

Regards,

Rich

On Wed, 3 May 2023, Michael Barton wrote:

The setup of my Mac is quite different from on Linux of course, but in my
GRASS.sh, GRASS_PYTHON is set to point to the actual file that launches
the correct python.

# set Python
export GRASS_PYTHON="$GISBASE/python.app/Contents/MacOS/python"

Perhaps giving it a path rather than simply calling python3 will help.

Michael,

I had tried pointing grass to /usr/bin/python3 but it didn't like that.
Here, /usr/bin/python3 points to /usr/bin/python3.9. This allows python3
minor version upgrades be found using the same command.

Somehow, the display monitors became FUBAR. Grass tells me that wx? is
running, but doesn't display the GUI, and I cannot stop them. It cannot find
the process ID (the .pid) file because there are no d.mon wx? processes
running. A reboot doesn't clear that clog. If I can get `git pull` to work
I'll rebuild and re-install grass and see if that fixes it.

Thanks,

Rich