QGis 2.14 and Grass 7: how to do it?

Since QGis version 2.14, whichever the Installation chosen, it has become impossible to use Grass 7 from the window of treatments.

An error message such as, or similar to the following appears at when trying to start a Grass 7

Let’s see how to solve this problem.

When you open the treatment window (Treatments -> Options) you have a Grass GIS7 item

The problem we encounter resides on the library Msys, present in previous installations and totally absent thenceforward the installation of version 2.14. There is no Msys in the folder apps or any other QGis Essen folder.

Therefore we cannot configure this line correctly.

Firstly, we will download the library MinGW (which contains Msys) at:
https://sourceforge.net/projects/mingw/?source=typ_redirect

Once downloaded, run the installation file mingw-get-setup.exe

At the end of the installation, you will have a window to install add- ons , including Msys

Select Msys and click for installation

Go to  the Installation menu, select Apply Changes to start the Msys installation on your computer .

Now that you have installed Msys in MinGW directory (default C: / MinGW) you can solve the QGis problem

WARNING! You enter a fourth dimension fault zone. Do not try to understand, follow the recipe …

Click on the button … Directory MSys and point to the directory installation. If you have left the default options it’s C: \ MinGW \ msys.

You will see a message indicating that the Grass directory does not exist. What is true since Essen is delivered with the Grass version   7.0.4.

Use the … button and GRASS7 directory point to the correct folder C: \ Program Files \ QGis Essen \ apps \ grass \ grass-7.0.4

When you click OK, you will see an error message for the Msys directory Msys. It is there that you must remain unmoved. Click the Cancel button of the Options window (YES the Cancel button).

Unlike any logic, the Cancel button closes the window but with the options configured. If you reopen the window you will see your new configuration:

But above all, if you launch now a Grass7 processing tool you will have the tool window displayed, in place of your initial error message .

And if after all this, it does not work

If this is the scenario, we must use significant resources. The Grass and Grass 7 configuration are stored in two files , grass -script.bat and grass7_script.bat located in users \ directory username \ .qgis2 \ processing.

Open the file corresponding to your problem (here we assume it’s with Grass 6) and manually change the following lines:

set GRASS_SH =
set PATH =
set WINGISBASE =
set GISBASE =
set GRASS_PROJSHARE =

For the first two lines, if you have followed the first part of the article, leaving the default options, you will have to replace them with:

set GRASS_SH = C: \ MinGW \ msys \ 1.0 \ bin \ sh.exe
set PATH = C: \ MinGW \ msys \ 1.0 \ bin; C : \ MinGW \ msys \ 1.0 \ lib;% PATH%

For the last three, he have to recover Grass version 6. If you have installed 2.14 and erased your previous releases, you do not have Grass 6 on your post anymore…

Install LTR version 2.8 always available on the QGis download site.

In this case the other three lines should to be:

set WINGISBASE = C: \ Program Files \ QGIS Wien \ apps \ grass \ grass-6.4.3
set GISBASE = C: \ Program Files \ QGIS Wien \ apps \ grass \ grass-6.4.3
set GRASS_PROJSHARE = ​​C: \ Program Files \ QGIS Wien \ apps \ grass \ grass-6.4.3 \ share \ proj

Save the file and start a Grass treatment in QGis…

Si cet article vous a intéressé et que vous pensez qu'il pourrait bénéficier à d'autres personnes, n'hésitez pas à le partager sur vos réseaux sociaux en utilisant les boutons ci-dessous. Votre partage est apprécié !

Leave a Reply

Your email address will not be published. Required fields are marked *