[Qgis-developer] [GRASS-dev] no grass plugin in qgis installed from osgeo4w

Markus Neteler neteler at osgeo.org
Tue Oct 27 09:01:11 PDT 2015

On Tue, Oct 27, 2015 at 3:53 PM, Pedro VenĂ¢ncio <pedrongvenancio at gmail.com>
> Hi Veronica,
> Did you install GRASS in OSGeo4W? Which version?
> On Sunday I made an installation on Windows and I found a problem. GRASS
> 7.0.2RC is already available on OSGeo4W. However, the .bat file that is
> created for the use of GRASS7 with QGIS, does not work, because it points
> the folder structure of GRASS 7.0.1.

Hi Pedro:
I'm not on the QGIS list, please forward to them that they would better use
this approach to get the path rather than hardocing it:

grass70 --config path

If they need Python, they could use something like this:


# query GRASS 7 itself for its GISBASE
startcmd = [grass7bin, '--config', 'path']

p = subprocess.Popen(startcmd, shell=False,
                     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()if p.returncode != 0:
    print >>sys.stderr, "ERROR: Cannot find GRASS GIS 7 start script
(%s)" % startcmd
gisbase = out.strip('\n\r')
 # Set GISBASE environment variableos.environ['GISBASE'] = gisbase#
the following not needed with trunkos.environ['PATH'] += os.pathsep +
os.path.join(gisbase, 'extrabin')# add path to GRASS addons
home = os.path.expanduser("~")os.environ['PATH'] += os.pathsep +
os.path.join(home, '.grass7', 'addons', 'scripts')

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151027/5ac73305/attachment.html>

More information about the Qgis-developer mailing list