[GRASS-user] Error in pansharp tool: missing grass.script

Moritz Lennert mlennert at club.worldonline.be
Thu Jun 25 00:40:27 PDT 2015


On 25/06/15 08:58, Andrea Peri wrote:
> Hi Vaclav,,
>
> I send the results of tests:
>
> outside from grass:
>
> python -c "import grass.script as grass"
>
> Traceback (most recent call last):
>    File "<string>", line 1, in <module>
> ImportError: No module named grass.script
>
> -----------------------------------------
> outside from grass:
> python -c "import grass"
>
> Traceback (most recent call last):
>    File "<string>", line 1, in <module>
> ImportError: No module named grass
>
> -----------------------------------------
>
> outside from grass:
> python -c "import sys; print(sys.path)"
>
> ['', '/usr/local/lib/python2.7/dist-packages/GDAL-2.0.0-py2.7-linux-x86_64.egg',
> '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',
> '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old',
> '/usr/lib/python2.7/lib-dynload',
> '/usr/local/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages/PIL',
> '/usr/lib/pymodules/python2.7',
> '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
>
> -----------------------------------------
>
> inside grass:
>
> python -c "import grass.script as grass"
> (no error)
>
> python -c "import grass"
> (no error)
>
> python -c "import sys; print(sys.path)"
> ['', '/usr/local/lib/python2.7/dist-packages/GDAL-2.0.0-py2.7-linux-x86_64.egg',
> '/usr/local/grass-7.0.0/etc/python',
> '/usr/local/grass-7.0.0/gui/wxpython', '/usr/lib/python2.7',
> '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk',
> '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',
> '/usr/local/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages',
> '/usr/lib/python2.7/dist-packages/PIL',
> '/usr/lib/pymodules/python2.7',
> '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
> GRASS 7.0.0 (toscana_location):/home/archivio/dati/raster/landsat/applicazione >
>

Everything looks normal to me. Have you tried launching i.pansharpen 
from "inside" grass ?

Moritz



More information about the grass-user mailing list