Still cannot get GRASS to work with Python 2.6

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Still cannot get GRASS to work with Python 2.6

Natalie Suzanne Robinson
Hello all,

    I am new to this list, but have read many, many posts!  I am having a
frequently encountered issue- namely configuring GRASS to work with Python
2.6 (an external version, as opposed to the bundled version). Many apologies
if this has been solved somewhere, but after about a week of searching I
have not found a solution that works for me.

    Here is the info on what my computer runs, what I have done, and what I
am encountering. Any help would be MUCH appreciated, I am at my wits end and
about to throw my computer through a window (and send some hate mail to
Microsoft).

   System:
     • Windows 7, 64-bit (but I use 32-bit versions of Python, GRASS, etc.
due to ArcGIS)
     • Installed: ArcGIS 10.0, Python 2.6 (with wxPython, PyWin32,
distribute,
                  setuptools, NumPy, iPython), GRASS 6.4.2. All
instillations
                  are compatible (all= 32-bit, compatible with Python 2.6,
etc.)
                  *I have also tried to install GRASS 6.4.3RC2-1, with the
same
                  Problem as described below*

   What I’ve done:
      1) As recommended at:
http://osgeo-org.1560.n6.nabble.com/GRASS-ArcGIS-and-Python-incompatibilties
-td4984692.html, I have done the following-
 
           In Windows Environmental Variables: Set ‘GRASS_PYTHON’ to
C:\Python26\python.exe
                                               Added %GISBASE%\etc\python to
‘PYTHONPATH’
           In Init.bat: Removed %PYTHONPATH% from ‘PYTHONPATH’ setting
                          (line now reads
“PYTHONPATH=%GISBASE%\etc\python;%GISBASE%\etc\wxpython”)
           In env.bat: Unset PYTHONHOME
                          (line now reads: set PYTHONHOME=""
                                           if "x%GRASS_PYTHON%" == "x" set
GRASS_PYTHON=python)
       
       2) Removed the Python27 folder from the GRASS installation


   What I am experiencing:
       1) Python26 starts from command line, and seems to work correctly
(imports
              modules like numpy, arcpy, wx)
       2) iPython also starts from command line, and seems to run correctly
       3) GRASS fails completely, with the following specifications:
             A) The old TclTk GUI starts OK, but I don’t want to use this
             B) When I start from GRASS 6.4.2 GUI with MSYS I get:

                Starting GRASS ...
                    'import site' failed; use -v for traceback
                    ERROR: wxGUI requires wxPython. No module named wx
                    Error in GUI startup. If necessary, please
                           report this error to the GRASS developers.
                    Switching to text mode now.
                    Hit RETURN to continue...
   
             *Whereupon hitting RETURN or typing <-v> RETURN both result in
the
                 program failing to launch (just shuts down)*

             C) When I start the command line, the same complete failure to
launch occurs
                  (a box flashes for about 1 millisecond, so I can’t even
see what is wrong).


    This makes me think that the root of the problem is that GRASS is not
finding the outside version of Python (otherwise why would it fail to find
wx when that module imports correctly in Python??)

    Thank-you SO much in advance for any assistance.

    Cheers,

Natalie Robinson
Department of Ecology and Evolutionary Biology
University of Colorado
(303) 492-5175
[hidden email]


_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows