[GRASS-user] need to run python-grass script outside grass in Unix environment
Vaclav Petras
wenzeslaus at gmail.com
Tue May 31 07:13:56 PDT 2016
On Mon, May 30, 2016 at 6:45 PM, alassane toure <atourej at gmail.com> wrote:
> I need help to run a python-grass script outside grass. I executed the
> following suggested program with the errors
>
> line 1: import: command not found
> /home/alassane/Programs/pythonGrass-example.py: line 2: import: command
> not found
> /home/alassane/Programs/pythonGrass-example.py: line 3: import: command
> not found
>
Hi, this sounds like you are running Python script with an interpreter like
Bash. Look at shebang. Taking example from GRASS source code,
scripts/r.shade/r.shade.py starts with:
#!/usr/bin/env python
Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160531/e6b38615/attachment.html>
More information about the grass-user
mailing list