首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GRASS启动失败

GRASS启动失败
EN

Stack Overflow用户
提问于 2018-11-30 01:16:31
回答 1查看 793关注 0票数 2

第一次尝试启动grass时出现以下错误

代码语言:javascript
复制
$ grass -text
ERROR: Unable to start GRASS GIS. You have the choice to:
 - Launch the graphical user interface with the '-gui' switch
     grass74 -gui
 - Launch with path to the location/mapset as an argument
     grass74 /path/to/location/mapset`
 - Create a location with '-c' and launch in its PERMANENT mapset
     grass74 -c EPSG:number /path/to/location
     grass74 -c geofile /path/to/location
 - Create manually the GISRC file (/home/nomon/.grass7/rc)
 - Use '--help' for further options
     grass74 --help
See also: https://grass.osgeo.org/grass74/manuals/helptext.html
Exiting...

最主要的错误是:

代码语言:javascript
复制
$ grass
Starting GRASS GIS...
Traceback (most recent call last):
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 86, in CheckForWx
    import wxversion
ModuleNotFoundError: No module named 'wxversion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 89, in CheckForWx
    import wx
ModuleNotFoundError: No module named 'wx'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/grass74/gui/wxpython/gis_set.py", line 31, in <module>
    from core import globalvar
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 116, in <module>
    CheckForWx()
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 103, in CheckForWx
    print >> sys.stderr, 'ERROR: wxGUI requires wxPython. %s' % str(e)
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(<message>, file=<output_stream>)"?
ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.
On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.
To run GRASS GIS in text mode use the -text flag.
Use '--help' for further options
     grass74 --help
See also: https://grass.osgeo.org/grass74/manuals/helptext.html
Exiting...

当我按照gui的指示操作时:

代码语言:javascript
复制
$ grass74 -gui
Starting GRASS GIS...
Traceback (most recent call last):
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 86, in CheckForWx
    import wxversion
ModuleNotFoundError: No module named 'wxversion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 89, in CheckForWx
    import wx
ModuleNotFoundError: No module named 'wx'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/grass74/gui/wxpython/gis_set.py", line 31, in <module>
    from core import globalvar
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 116, in <module>
    CheckForWx()
  File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 103, in CheckForWx
    print >> sys.stderr, 'ERROR: wxGUI requires wxPython. %s' % str(e)
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(<message>, file=<output_stream>)"?
ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.
On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.
To run GRASS GIS in text mode use the -text flag.
Use '--help' for further options
     grass74 --help
See also: https://grass.osgeo.org/grass74/manuals/helptext.html
Exiting...

我安装了grass-core、grass-gui、grass-dev、wx3.0-headers、wxsqlite3-3.0-dbg和wxcommon。

发生什么事了呢?

EN

回答 1

Stack Overflow用户

发布于 2019-11-17 23:39:25

实际情况是,用于运行grass的python解释器没有安装wxPython包。

为了解决这个问题,你可以创建一个python环境(Conda或env),激活它并安装grass所需的包(基本的包是wxpython和numpy)。

代码语言:javascript
复制
conda create -n grass_env python=3
conda activate grass_env
conda install wxpython
conda install numpy

然后,在这个环境中运行grass。每次你想运行grass时,你必须激活这个环境conda activate grass_env

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53544348

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档