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

Pedro VenĂ¢ncio pedrongvenancio at gmail.com
Tue Oct 27 16:43:16 PDT 2015


Hi,

Just forwarding this tip from Markus, about the problem I've found in
OSGeo4W:



> 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 to
> > 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:
>
>
> https://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Python:_GRASS_GIS_7
>
> # 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
>     sys.exit(-1)
> 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')
>
>
>
> Best
> Markus
>


Best regards,
Pedro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151027/3df6620d/attachment.html>


More information about the Qgis-developer mailing list