1

How can I set my spyder environment in order to use GRASS Python script in Spyder for Windows 10? I need to use some Python script from GRASS GIS. I am really new in Python and manipulate with scripts. I follow the following setup to set my spyder environment but I always got error messages (No module named grass.script)

@echo off
rem set OSGEO4W_ROOT=c:\OSGEO4W64
rem set PATH=%OSGEO4W_ROOT%\bin;%PATH%
call c:\osgeo4w64\bin\o4w_env.bat
call %OSGEO4W_ROOT%\apps\grass\grass-7.6.0\etc\env.bat
set GDAL_DRIVER_PATH=%OSGEO4W_ROOT%\bin\gdalplugins\1.9
set PATH=%PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
set PATH=%PATH%;%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\lib
set PATH=%PATH%;%OSGEO4W_ROOT%\apps\Python27\Scripts\
set GISBASE=C:\OSGeo4W64\apps\grass\grass-7.6.0
set GISDBASE=C:\Users\Wael Hassan\Documents\grassdata
set GISRC=C:\Users\Wael Hassan\AppData\Roaming\GRASS7
set GRASS_SH=C:\OSGeo4W\apps\msys\bin\sh.exe
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python;
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\Python27\Lib\site-packages
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\etc\python
set QGISPATH=%OSGEO4W_ROOT%\apps\qgis
start c:\OSGeo4W64\apps\Python27\Scripts\spyder.bat

closed as unclear what you're asking by user2856, Vince, HDunn, LaughU, Fran Raga Jul 16 at 8:56

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I try to use some python script from grass gis in spyder, but I could not set the environment properly can you help step by step how to do that!! – Wael Jul 16 at 1:11
  • and also I don't have "spyder.bat" file – Wael Jul 16 at 5:07
  • Here may be some info: grasswiki.osgeo.org/wiki/… – markusN Aug 6 at 6:15

Browse other questions tagged or ask your own question.