[Qgis-user] problem with GRASS custom variables

Hugh Kelley hghklly at gmail.com
Sat Aug 5 11:10:20 PDT 2023


Hi Martin, I don't use grass with qgis much but I do have a guess.   When
you look at your installed programs, is it possible there are options for
"qgis" and then also a listing specifically for "qgis with grass".
Different operating environments might explain why you can't import from
grass as expected when opening gui qgis.

Hopefully someone has a more informed suggestion but this seemed worth
mentioning.

On Sat, Aug 5, 2023, 12:50 PM Martin Landa via QGIS-User <
qgis-user at lists.osgeo.org> wrote:

> Dear QGIS users,
>
> I have problem setting up custom GRASS-related variables in QGIS settings
> (use custom variables):
>
> [image: image.png]
> Unfortunately after restarting QGIS the statement below in Python Console
>
> from grass.pygrass.gis import Mapset
>
> fails with
>
> ImportError: Could not load grass_raster.8.4.
>
> When I set the same environmental variables before starting QGIS from
> shell than the pyGRASS statement *works*:
>
> GISBASE=/home/martin/src/grass/dist.x86_64-pc-linux-gnu
> PYTHONPATH=/home/martin/src/grass/dist.x86_64-pc-linux-gnu/etc/python
> LD_LIBRARY_PATH=/home/martin/src/grass/dist.x86_64-pc-linux-gnu/lib qgis
>
> Any idea why custom variables defined by QGIS settings fail in this case?
> Why are they behaving differently from environmental variables defined in
> the shell?
>
> Thanks in advance, Martin
>
> --
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230805/06c4c75f/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 36107 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230805/06c4c75f/attachment-0001.png>


More information about the QGIS-User mailing list