I´m trying to write a Python script, that includes different ArcPy / ArcGIS commands and want to combine it with GRASS geoprocessing tools.
Unfortunately importing the GRASS libraries doesn´t work.
import grass.script as grass
ends in an error:
Traceback (most recent call last): File "<interactive input>", line 1, in <module> ImportError: No module named script
I know that GRASS GIS installs it's own Python version. Isn´t there a way to combine the ArcGIS and the GRASS GIS installation of Python? I tried copying the pygrass module (or what I thought it might be it) to the C:\Python26\ArcGIS10.0\Lib\site-packages\ folder. I´m getting a different error message, but it´s still not working.
Traceback (most recent call last): File "<interactive input>", line 1, in <module> File "C:\Python26\ArcGIS10.0\lib\site-packages\grass\script\__init__.py", line 1, in <module> from core import * File "C:\Python26\ArcGIS10.0\lib\site-packages\grass\script\core.py", line 38, in <module> gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale')) File "C:\Python26\ArcGIS10.0\lib\ntpath.py", line 96, in join assert len(path) > 0 TypeError: object of type 'NoneType' has no len()
I´m using ArcGIS 10 and GRASS 6.4.2 on a Windows 7 64 Bit machine. Any help would be highly appreciated.