[GRASS-user] Using grass.script in Jupyter (Azure)

Vaclav Petras wenzeslaus at gmail.com
Wed Oct 10 07:04:59 PDT 2018


On Tue, Oct 9, 2018 at 9:25 PM Mehrdad Varedi <varedi at gmail.com> wrote:

> Hi Everyone,
>
> I want to develop a program using GRASS python libraries in Jupyter(on
> Azure). All codes begin with:
>
>
> *import* *grass.script* *as* *gscript*
>
>
> of course the grass.script is not available in Jupyter. I tried to install
> GRASS
>
> I used: !pip install GRASS
>
> and it worked like a charm, although I can't have access to grass.script.
>
> Sorry if it is a silly question, although I apreciate any idea to begin
> programming GRASS on Azure.
>


Hi Mehrdad,

the package you installed is not GRASS GIS. Install GRASS GIS using
whatever is appropriate for your platform (e.g. using apt install grass on
Ubuntu, but ideally after connecting PPA in this case). Then there is
couple of approaches how to use GRASS GIS with Jupyter. The one I prefer is
starting Jupyter Notebook and than starting GRASS GIS from there:

https://github.com/wenzeslaus/geospatial-modeling-course-jupyter/blob/master/notebooks/buffers_cost_python.ipynb

See also:

[GRASS-dev] Package grass installed by pip is not GRASS GIS
https://lists.osgeo.org/pipermail/grass-dev/2018-October/090191.html

Best,
Vaclav


> I appreciate any help you can provide,
>
>
>
> Mehrdad
>
> --
>
> Mehrdad Varedi
>> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181010/75487a43/attachment.html>


More information about the grass-user mailing list