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

Markus Neteler neteler at osgeo.org
Tue Jul 28 13:27:50 PDT 2020


(please keep the list in cc)

On Tue, Jul 28, 2020 at 9:17 PM DAmico, Ellen <DAmico.Ellen at epa.gov> wrote:
>
> Thanks for the quick response.  Does that work with both python 2.7 and 3?

Honestly, I don't know but you may want to verify here:

https://github.com/zarch/grass-session

> 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?

Perhaps simply a PYTHONPATH issue?
At the bottom of this page there are some examples:

https://github.com/zarch/grass-session/blob/master/README.rst

Markus


More information about the grass-user mailing list