[GRASS-user] Running a python script using GRASS GIS on a Mac
Shaffiq Somani
SSomani at msn.com
Mon Nov 22 20:26:22 PST 2021
Dear Moritz,
Thank you for your response since its greatly appreciated. Sorry, I just saw your message since it went into the spam folder. I have a couple of questions for you if you have a moment free. I looked at the Linux environmental variables which is export GRASS_BIN=/usr/bin/grass78, but changed it to GRASSBASE and opened up the unix file as shown in the screenshot below. I still get the following errors. Is there anything else that I am missing or should I be doing this another way. Thanks.
Kind Regards,
Shaffiq
[cid:2c15f0d4-fbb2-4c60-9c09-8a606f896c85]
________________________________
From: Moritz Lennert <mlennert at club.worldonline.be>
Sent: Monday, November 22, 2021 2:16 AM
To: grass-user at lists.osgeo.org <grass-user at lists.osgeo.org>; Shaffiq Somani <ssomani at msn.com>
Subject: Re: [GRASS-user] Running a python script using GRASS GIS on a Mac
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
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fspareeth%2FPySEBAL_dev%2Ftree%2Fversion3.7.3%2Fgapfilling&data=04%7C01%7C%7Cf535d63b09244ba1e6fa08d9ad881614%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637731622263517024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zPp%2BeqagyPPRsG%2BWpZ0%2B3YrPXhsD5hCYEixbfAX3zhA%3D&reserved=0
>
>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.
Moritz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20211123/4e2eacea/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 507264 bytes
Desc: image.png
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20211123/4e2eacea/attachment-0001.png>
More information about the grass-user
mailing list