[Qgis-user] SAGA-GIS on OS X 10.7
William Kyngesburye
woklist at kyngchaos.com
Mon Apr 15 07:10:24 PDT 2013
I tested the Mac tests before committing them, though only as a bundled saga. The second part is right, since the sagaPath() does not end with a '/'. I was just being inconsistent in the use or not of os.path.join().
Try testing saga in a Terminal. The test sextante uses is
saga_cmd shapes_points 16 /path/to/qgis/src/python/plugins/sextante/tests/points.shp ~/Desktop/polygons.shp
It should create the polygons.shp on your desktop.
On Apr 15, 2013, at 6:32 AM, Agustin Diez-Castillo wrote:
> Dear all,
> After some success installing SAGA, I've tried editing SagaUtils.py and hard coding the SAGA_FOLDER to /usr/local/bin with not success. Having not knowledge of python, it seems to me that the following else clause should work in mac as well.
>
> if SextanteUtils.isMac():
> testfolder = os.path.join(str(QgsApplication.prefixPath()), "bin")
> if os.path.exists(os.path.join(testfolder, "saga_cmd")):
> folder = testfolder
> else:
> testfolder = "/usr/local/bin"
> if os.path.exists(os.path.join(testfolder, "saga_cmd")):
> folder = testfolder
>
> and the same in the next call to Mac
>
> elif SextanteUtils.isMac():
> fout.write("export SAGA_MLB=" + SagaUtils.sagaPath() + "/../lib/saga\n");
> fout.write("export PATH=" + SagaUtils.sagaPath() + ":$PATH\n");
> else:
> pass
> for command in commands:
> fout.write("saga_cmd " + command.encode("utf8") + "\n")
>
> In this case I have doubts if SAGA_MLB should be "../lib/saga\n" instance of ""/../lib/saga\n"
>
> I've tested most of the above option with no success whatsoever
> Error messages are not always the same but the further I get is to:
>
> Error while checking SAGA installation. SAGA might not be correctly configured.
> Traceback (most recent call last):
> File "/Applications/QGIS_2.0-dev.app/Contents/Resources/python/plugins/sextante/saga/SagaUtils.py", line 146, in checkSagaIsInstalled
> from sextante.core.Sextante import runalg
> ImportError: cannot import name runalg
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."
- the wisdom of Tarzan
More information about the Qgis-user
mailing list