[GRASS-user] Using grass libraries in python outside of GRASS

DAmico, Ellen DAmico.Ellen at epa.gov
Wed Jul 29 04:25:11 PDT 2020


Interesting.  I will await anything you find.   Thank you.  Ellen

-----Original Message-----
From: Markus Neteler <neteler at osgeo.org> 
Sent: Wednesday, July 29, 2020 4:01 AM
To: DAmico, Ellen <DAmico.Ellen at epa.gov>
Cc: GRASS user list <grass-user at lists.osgeo.org>
Subject: Re: [GRASS-user] Using grass libraries in python outside of GRASS

On Tue, Jul 28, 2020 at 10:27 PM Markus Neteler <neteler at osgeo.org> wrote:
> On Tue, Jul 28, 2020 at 9:17 PM DAmico, Ellen <DAmico.Ellen at epa.gov> wrote:
...
> > The model I need to use (which I did not write) requires python 2.7.
> > I had tried pip install previously but then it still fails with ImportError: No module named grass.script.
> > Do you know what could be causing that?

Interestingly, our docker containers just started to suffer from a similar (same?) problem:

File "/scripts/test_grass_session.py", line 3, in <module> import grass.script as grass
ModuleNotFoundError: No module named 'grass'

Weird, we need to investigate.

Markus

> Perhaps simply a PYTHONPATH issue?
> At the bottom of this page there are some examples:
>
> https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> ub.com%2Fzarch%2Fgrass-session%2Fblob%2Fmaster%2FREADME.rst&data=0
> 2%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C8
> 8b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601&sdata
> =bPE1zELFkkj3HpVVopBH7a6nPpAdRK%2BdC2Tj1h4hdIs%3D&reserved=0
>
> Markus



--
Markus Neteler, PhD
https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mundialis.de%2F&data=02%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601&sdata=I6CFUA2PPoaFwdRImG24FuTsIUsOuqwtzxF%2Fy3nV0B8%3D&reserved=0 - free data with free software
https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrass.osgeo.org%2F&data=02%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601&sdata=gnL1xIhAsTEfJznQqT%2BMUkVYBPXZArIMFvz5Y%2FeLM2U%3D&reserved=0
https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcourses.neteler.org%2Fblog&data=02%7C01%7CDAmico.Ellen%40epa.gov%7C6e81e6c4acc84db1340008d833959e0f%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637316064983993601&sdata=X6lnIHt7PAJEc2pO0mixaTNicoCBBcoTJdezpJ%2BfFTg%3D&reserved=0


More information about the grass-user mailing list