[GRASS-dev] GRASS, ArcGIS, and Python incompatibilties

I thought I’d seen this somewhere on the list, but I can’t seem to find it. If there is a posted answer, perhaps someone could point me to it. Otherwise, hopefully, someone can offer an answer.

I’m working with a colleague who has Windows 7 and ArcGIS installed. He installed GRASS for Windows, but it won’t launch due to some combination of Python/wxPython incompatibility. We’re pretty sure that it has to do with the version of Python he had to install with ArcGIS. The ArcGIS Python is 2.6, but GRASS for Windows comes with Python 2.7. Is there some configuration setting to get around this?

Michael


C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research &
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

Michael,

check whether any of these two items under Troubleshooting for MS Windows applies:
http://courses.ncsu.edu/mea582/common/GIS_anal_assign/GIS_Anal_Aintro.html
(it may be the dll issue - that is what some of my students had to do last semester).
Otherwise, we had 50 students running GRASS along ArcGIS on their own laptops
successfully, for which I am enormously grateful to all who have contributed to WinGRASS
installer success.

Helena

Helena Mitasova
Associate Professor
Department of Marine, Earth, and Atmospheric Sciences
2800 Faucette Drive, Rm. 1125 Jordan Hall
North Carolina State University
Raleigh, NC 27695-8208
hmitaso@ncsu.edu

"All electronic mail messages in connection with State business which are sent to or received by this account are subject to the NC Public Records Law and may be disclosed to third parties.”

On Jun 28, 2012, at 5:02 PM, Michael Barton wrote:

I thought I'd seen this somewhere on the list, but I can't seem to find it. If there is a posted answer, perhaps someone could point me to it. Otherwise, hopefully, someone can offer an answer.

I'm working with a colleague who has Windows 7 and ArcGIS installed. He installed GRASS for Windows, but it won't launch due to some combination of Python/wxPython incompatibility. We're pretty sure that it has to do with the version of Python he had to install with ArcGIS. The ArcGIS Python is 2.6, but GRASS for Windows comes with Python 2.7. Is there some configuration setting to get around this?

Michael
_____________________
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research &
University Corporation for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

Michael Barton wrote:

I thought I'd seen this somewhere on the list, but I can't seem to find
it. If there is a posted answer, perhaps someone could point me to it.
Otherwise, hopefully, someone can offer an answer.

I'm working with a colleague who has Windows 7 and ArcGIS installed. He
installed GRASS for Windows, but it won't launch due to some combination
of Python/wxPython incompatibility. We're pretty sure that it has to do
with the version of Python he had to install with ArcGIS. The ArcGIS
Python is 2.6, but GRASS for Windows comes with Python 2.7. Is there
some configuration setting to get around this?

GRASS 7 should be able to use any of 2.5, 2.6, or 2.7. The Windows
installer tries to force the use of a bundled version, so you may need
to undo that first (remove it's bundled Python, unset any PYTHONHOME
or PYTHONPATH variables, etc).

--
Glynn Clements <glynn@gclements.plus.com>

Don't you need to have the wxPython that GRASS was compiled with? And doesn't this wxPython have to match the Python version?

Michael

On Jun 29, 2012, at 1:49 PM, Glynn Clements wrote:

Michael Barton wrote:

I thought I'd seen this somewhere on the list, but I can't seem to find
it. If there is a posted answer, perhaps someone could point me to it.
Otherwise, hopefully, someone can offer an answer.

I'm working with a colleague who has Windows 7 and ArcGIS installed. He
installed GRASS for Windows, but it won't launch due to some combination
of Python/wxPython incompatibility. We're pretty sure that it has to do
with the version of Python he had to install with ArcGIS. The ArcGIS
Python is 2.6, but GRASS for Windows comes with Python 2.7. Is there
some configuration setting to get around this?

GRASS 7 should be able to use any of 2.5, 2.6, or 2.7. The Windows
installer tries to force the use of a bundled version, so you may need
to undo that first (remove it's bundled Python, unset any PYTHONHOME
or PYTHONPATH variables, etc).

--
Glynn Clements <glynn@gclements.plus.com>

_____________________
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research &
University Consortium for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

Michael Barton wrote:

Don't you need to have the wxPython that GRASS was compiled with?
And doesn't this wxPython have to match the Python version?

GRASS isn't "compiled" with any version of Python, i.e. it doesn't
have any binaries which link against the Python DLL/DSO.

At one time there were binary modules for the wx GUI's nviz and vdigit
components, and the SWIG wrappers, but those have all since been
eliminated.

--
Glynn Clements <glynn@gclements.plus.com>

Does this mean that we no longer *have* to bundle wxPython with the Mac binaries? That they will work with whatever wxPython is installed (assuming it is within the range of supported versions, of course) regardless of what it was compiled with?

Michael

On Jun 30, 2012, at 4:32 PM, Glynn Clements wrote:

Michael Barton wrote:

Don't you need to have the wxPython that GRASS was compiled with?
And doesn't this wxPython have to match the Python version?

GRASS isn't "compiled" with any version of Python, i.e. it doesn't
have any binaries which link against the Python DLL/DSO.

At one time there were binary modules for the wx GUI's nviz and vdigit
components, and the SWIG wrappers, but those have all since been
eliminated.

--
Glynn Clements <glynn@gclements.plus.com>

_____________________
C. Michael Barton
Visiting Scientist, Integrated Science Program
National Center for Atmospheric Research &
University Consortium for Atmospheric Research
303-497-2889 (voice)

Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

I guess technically it could use the system wxpython. But I can think of a few reasons to still bundle wxpython:

- bug fixes in later versions than the system version that greatly affect use in GRASS (I don't remember, but I think there were some?)

- consistency of behavior across system versions from having the same wxpython

- 64bit support in wxpython 2.9 when GRASS is happy with 2.9 (or whatever the release version is, 2.10?)

- simply that wxpython is not included in the system starting with OS X 10.7

On Jun 30, 2012, at 10:28 PM, Michael Barton wrote:

Does this mean that we no longer *have* to bundle wxPython with the Mac binaries? That they will work with whatever wxPython is installed (assuming it is within the range of supported versions, of course) regardless of what it was compiled with?

Michael

On Jun 30, 2012, at 4:32 PM, Glynn Clements wrote:

Michael Barton wrote:

Don't you need to have the wxPython that GRASS was compiled with?
And doesn't this wxPython have to match the Python version?

GRASS isn't "compiled" with any version of Python, i.e. it doesn't
have any binaries which link against the Python DLL/DSO.

At one time there were binary modules for the wx GUI's nviz and vdigit
components, and the SWIG wrappers, but those have all since been
eliminated.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?"

- The Ruler of the Universe

Michael Barton wrote:

Does this mean that we no longer *have* to bundle wxPython with the
Mac binaries? That they will work with whatever wxPython is installed
(assuming it is within the range of supported versions, of course)
regardless of what it was compiled with?

That should be the case.

GRASS should only require that you have a suitable version of Python
with suitable versions of the necessary modules (primarily wxPython
and NumPy).

One issue with unbundling is that installing the additional components
may be considered inconvenient on platforms which lack package
management facilities.

OTOH, bundling has issues of its own, mainly that you may get
conflicts between the bundled version and the "system" version.

--
Glynn Clements <glynn@gclements.plus.com>