[GRASS-user] GRASS, ArcGIS, and Python incompatibilties
gene
martin.laloux at gmail.com
Fri Jun 29 01:32:49 PDT 2012
at work, we use ArcGIS (Python 2.6), GRASS GIS (Python 2.7) QGIS (Python 2.7)
and a standard Python (version 2.5) installed on Windows XP without problem
(in the Windows Registry, only Python 2.5 and the Python 2.6 of ArcGIS)
*Arcpy*
- has no wxPython module:
>>> import wx
Runtime error <type 'exceptions.ImportError'>: No module named wx
>>> from wxPython.wx import *
Runtime error <type 'exceptions.ImportError'>: No module named wxPython.wx
>>> from wxPython import *
Runtime error <type 'exceptions.ImportError'>: No module named wxPython
- but we can use modules of Python 2.5 (without dlls...)
>>> import subprocess
>>> argument= str(geom)
>>> trait =
subprocess.Popen(['C:/Python25/python.exe','d:/test/testshapely.py',argument],
stdout=subprocess.PIPE)
>>> wkt= trait.stdout.read()
>>> print wkt
'LINESTRING (232278.9235196237900000....
*QGIS or GRASS GIS*
The same thing is true (see
http://www.portailsig.org/content/qgis-lancer-des-scripts-python-ou-des-commandes-shell-depuis-la-console-python-ou-avec-scrip
http://www.portailsig.org/content/qgis-lancer-des-scripts-python-ou-des-commandes-shell-depuis-la-console-python-ou-avec-scrip
, in French)
When we try to use Arcpy in GRASS GIS or QGIS, the error message is
import sys
sys.path.append('C:\\Program Files\\ArcGIS\\Desktop10.0\\arcpy\\')
sys.path.append('C:\\Program Files\\ArcGIS\\Desktop10.0\\Bin\\')
import arcpy
Traceback (most recent call last):
....
*ImportError: Module use of python26.dll conflicts with this version of
Python*.
same thing if i use subprocess.Popen
If i do the same thing in ArcPy
sys.path.append('C:\\Program Files\\GRASS
6.4.2\\Python27\\Lib\\site-packages')
import wx
Traceback (most recent call last):
...
*ImportError: Module use of python27.dll conflicts with this version of
Python*.
so i do not think that the problem comes from the different versions of
Python
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GRASS-ArcGIS-and-Python-incompatibilties-tp4984692p4984776.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list