Why not upgrading your QGIS version?
To know the GRASS path, you need to know how Processing really works.
- First, it is a Python module (processing) that uses subprocess to execute the original GRASS commands.
- Consequently, the script need to know the Grass installation path.
With Python in the console, you can obtain the default path (I suppose you use the Kyng Chaos version).
1) For Grass 6.4.x
The script to find the default Grass path is:
/Applications/QGIS.app/Contents/Resources/python/plugins/processing/algs/grass/GrassUtils.py #lines 256-258 for your QGIS version
import processing
# you want to use here the Grass algoritm
import processing.algs.grass.GrassUtils as ga6
ga6.GrassUtils.grassPath()
u'/Applications/QGIS.app/Contents/MacOS/grass'
Therefore, by default, processing uses the GRASS version installed into the QGIS application with the script grass.sh to launch GRASS and execute commands.
import os
os.path.exists(ga6.GrassUtils.grassPath() + os.sep + 'grass.sh')
True
You can let the Processing Options (path to GRASS) empty. QGIS always find the path.
If you want to use another GRASS version (GRASS-6.4.6.app for example), simply change the parameters in the Processing Options with a folder path that contains the grass.sh script (/Applications/GRASS-6.4.6.app/Contents/MacOS
for example).
os.path.exists('/Applications/GRASS-6.4.6.app/Contents/MacOS/grass.sh')
True
# and
ga6.GrassUtils.grassPath()
/Applications/GRASS-6.4.6.app/Contents/MacOS
os.path.exists(ga6.GrassUtils.grassPath() + os.sep + 'grass.sh')
True
Result:
2) For Grass 7.x
Same procedure and the file is:
/Applications/QGIS.app/Contents/Resources/python/plugins/processing/algs/grass7/Grass7Utils.py
import processing.algs.grass7.Grass7Utils as ga7
ga7.Grass7Utils.grassPath()
'/Applications/GRASS-7.0.app/Contents/MacOS'
import os
os.path.exists(ga7.Grass7Utils.grassPath() + os.sep + 'grass70.sh')
False
Problem here, I have a GRASS-7.0.app (from GRASS GIS for Mac) installed but no /Applications/GRASS-7.0.app/Contents/MacOS/grass70.sh
script. The script to launch GRASS-7.0.app is /Applications/GRASS-7.0.app/Contents/MacOS/grass.sh
The solution is to replace grass70.sh by grass.sh in the lines 254-256 of the script Grass7Utils.py
Original:
if isMac() and os.path.exists(Grass7Utils.grassPath() + os.sep + 'grass70.sh'):
command = Grass7Utils.grassPath() + os.sep + 'grass70.sh ' \
+ Grass7Utils.grassMapsetFolder() + '/PERMANENT'
Correction:
if isMac() and os.path.exists(Grass7Utils.grassPath() + os.sep + 'grass.sh'):
command = Grass7Utils.grassPath() + os.sep + 'grass.sh ' \
+ Grass7Utils.grassMapsetFolder() + '/PERMANENT'
Result:
Hope this will help you but there are many problems with El Capitan (from GRASS GIS for Mac and Grass Gis 7 does not start in OS X 10.11 El Capitan)
WARNING: current GRASS binaries may not work with EL CAPITAN - OS X 10.11 unless you disable "System Integrity Protection".
I got the same problem using the Osgeo installer, but I just managed to solve it.
First download this https://sourceforge.net/projects/mingw/?source=typ_redirect
Install it, look for msys-base package and install it.
Set the path to msys in QGIS to "C:\MinGW\msys" or what ever local drive it was installed on and the Grass algorithms should work fine.
Best Answer
It looks like you are working with an older version of the processing plugin.
Take a look into
C:\users\<username>\.qgis2\python\plugins
and delete any folder named processing.The current core version does not need the msys folder for GRASS 7 commands, only GRASS (which is GRASS 6.4.3) still needs it.
r.watershed
is included in GRASS and GRASS7, so I suggest to deactivate GRASS to avoid the MSYS folder problem. The standalone QGIS 2.16.1 version does not include GRASS 6 anymore, only 7.0.4. TheGrass folder
you specified would not be correct anyway, it should point to the subfolder grass-6.4.3 (if that is installed).The
R folder
has nothing to do with GRASS, but with scripts for R. Since you don't want to use that, you might deactivate the R data provider in the Processing options as well.