[GRASS-user] Running a python script using GRASS GIS on a Mac

Moritz Lennert mlennert at club.worldonline.be
Sun Nov 21 23:16:58 PST 2021

Hi Shaffiq,

Le 22 novembre 2021 00:48:04 GMT+01:00, Shaffiq Somani <ssomani at msn.com> a écrit :
>Dear GRASS Community,
>I am trying to run grass as a Python script  for the gapfilling component of PySEBAL where the GitHub directory is shown below.   I have already imported the grass-session using the pip3 command.
>PySEBAL GitHub Directory GapFilling
>The Windows Environmental Variable setup file is shown below which I tried to follow in the  Jupyter Notebook and  see if I can import GRASS.  Unfortunately, I had no luck as shown in the screenshot.
>set GRASSBIN=C:\OSGeo4W64\bin\grass78

As you can see here, GRASSBIN points to the actual 'binary' file that contains the GRASS GIS launch script (grass78). In your example it seems to me that you only point to the directory that contains it, not the actual file. Try adding the name of the file to your path.


More information about the grass-user mailing list