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@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@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user >
_______________________________________________ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user