[GRASS-user] Using grass.script in Jupyter (Azure)
Mehrdad Varedi
varedi at gmail.com
Sat Oct 20 11:25:35 PDT 2018
Thanks, I will check it out Vaclav.
I actually preferred to rewrite the scripts in R and run R from the grass
command line.
Thanks for your help. So much dedication to the group of users is really
appreciated.
Have a great one,
Mehrdad
On Fri, Oct 19, 2018 at 4:30 PM Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
>
> On Sat, Oct 13, 2018 at 9:09 PM Mehrdad Varedi <varedi at gmail.com> wrote:
> >
> > ImportError Traceback (most recent call
> last)
> > <ipython-input-3-cd30798f91ed> in <module>()
> > ----> 1 import grass.script as gs
> > 2 import grass.script.setup as gsetup
> >
> >
> f:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.4.1\etc\python\grass\script\__init__.py
> in <module>()
> > 3 from __future__ import absolute_import
> > 4
> > ----> 5 from .core import *
> > 6 from .db import *
> > 7 from .raster import *
> >
> >
> f:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.4.1\etc\python\grass\script\core.py
> in <module>()
> > 42 # python3
> > 43 import builtins as __builtin__
> > ---> 44 from os import environb as environ
> > 45 unicode = str
> > 46 __builtin__.__dict__['_'] =
> __builtin__.__dict__['_'].__self__.lgettext
> >
> > ImportError: cannot import name 'environb' from 'os'
> (f:\ProgramData\Anaconda3\lib\os.py)
>
> You are trying to run it in Python 3 which is the first part of the
> traceback (that is actually fine if you want to run it in Python 3 - but
> note that the support is experimental).
>
> As for the error itself, environb is a part of os in Python 3, so I don't
> understand why that would be missing in your Anaconda Python. You can check
> the files manually and confirm that all is an expected Python version.
>
> https://docs.python.org/3/library/os.html#os.environb
>
--
Mehrdad Varedi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181020/0c6b2b15/attachment-0001.html>
More information about the grass-user
mailing list