solution for GRASS GIS 6.4.3 on linux failed to open the gui
来源:互联网 发布:首届江苏网络 编辑:程序博客网 时间:2024/05/29 10:44
GRASS GIS 6.4.3 on linux have errors as follows:
GRASS 6.4.3 (nc_spm_08):~/softgrass/grass/bin > g.gui gui=wxpython
Launching 'wxpython' GUI in the background, please wait ...
Traceback (most recent call last):
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/wxgui.py", line 34, in <module>
from lmgr.frame import GMFrame
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/lmgr/frame.py", line 46, in <module>
from lmgr.layertree import LayerTree, LMIcons
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/lmgr/layertree.py", line 37, in <module>
from mapdisp.frame import MapFrame
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/mapdisp/frame.py", line 52, in <module>
from wxplot.profile import ProfileFrame
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/wxplot/profile.py", line 23, in <module>
import wx.lib.plot as plot
File "/home/qq/softgrass/python/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py", line 132, in <module>
raise ImportError, "Numeric,numarray or NumPy not found. \n" + msg
ImportError: Numeric,numarray or NumPy not found.
This module requires the Numeric/numarray or NumPy module,
which could not be imported. It probably is not installed
(it's not part of the standard Python distribution). See the
Numeric Python site (http://numpy.scipy.org) for information on
downloading source or binaries.
Solution:
When I checked in Python, I had numpy installed, so that wasn’t the issue.
I couldn’t find anything useful online to help me fix it but then I thought, it’s Python and it’s open source. Let’s have a hack!
I opened the following file (if I was more leet I would have used vim or nano or something):
/home/qq/softgrass/python/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py
I then went to line 117 and added the first three linesshown in the code block below,remembering to alter all the indents etc:
try:
import numpy as _Numeric
except:
try:
import numpy.oldnumeric as _Numeric
except:
try:
import numarray as _Numeric #if numarray is used it is renamed Numeric
except:
try:
import Numeric as _Numeric
except:
msg= """
Numeric Python site (http://numpy.scipy.org) for information on
downloading source or binaries."""
raise ImportError, "Numeric,numarray or NumPy not found. \n" + msg
GRASS 6.4.3 (nc_spm_08):~/softgrass/grass/bin > g.gui gui=wxpython
Launching 'wxpython' GUI in the background, please wait ...
Traceback (most recent call last):
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/wxgui.py", line 34, in <module>
from lmgr.frame import GMFrame
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/lmgr/frame.py", line 46, in <module>
from lmgr.layertree import LayerTree, LMIcons
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/lmgr/layertree.py", line 37, in <module>
from mapdisp.frame import MapFrame
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/mapdisp/frame.py", line 52, in <module>
from wxplot.profile import ProfileFrame
File "/home/qq/softgrass/grass/grass-6.4.3/etc/wxpython/wxplot/profile.py", line 23, in <module>
import wx.lib.plot as plot
File "/home/qq/softgrass/python/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py", line 132, in <module>
raise ImportError, "Numeric,numarray or NumPy not found. \n" + msg
ImportError: Numeric,numarray or NumPy not found.
This module requires the Numeric/numarray or NumPy module,
which could not be imported. It probably is not installed
(it's not part of the standard Python distribution). See the
Numeric Python site (http://numpy.scipy.org) for information on
downloading source or binaries.
Solution:
When I checked in Python, I had numpy installed, so that wasn’t the issue.
I couldn’t find anything useful online to help me fix it but then I thought, it’s Python and it’s open source. Let’s have a hack!
I opened the following file (if I was more leet I would have used vim or nano or something):
/home/qq/softgrass/python/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py
I then went to line 117 and added the first three linesshown in the code block below,remembering to alter all the indents etc:
try:
import numpy as _Numeric
except:
try:
import numpy.oldnumeric as _Numeric
except:
try:
import numarray as _Numeric #if numarray is used it is renamed Numeric
except:
try:
import Numeric as _Numeric
except:
msg= """
This module requires the Numeric/numarray or NumPy module,
which could not be imported. It probably is not installed
(it's not part of the standard Python distribution). See theNumeric Python site (http://numpy.scipy.org) for information on
downloading source or binaries."""
raise ImportError, "Numeric,numarray or NumPy not found. \n" + msg
I then saved the file and restarted GRASS and it all (seems) to be running smoothly and as it should do.
From: http://ajgdevelop.com/tag/linux/
0 0
- solution for GRASS GIS 6.4.3 on linux failed to open the gui
- Failed to open/create the internal network Vagrant on Windows10
- solution for cannot open full screen for ubuntu on virtualbox
- Linux:Failed to get exclusive lock on the configuration file
- The underlying provider failed on open 问题解决
- 关于 The underlying provider failed on Open
- GRASS GIS启动后出错:Unable to access the X Display,is $DISPLAY set properly?
- The request to open "bundle id" failed.
- virtualbox学习之“failed to open a session for the virtual machine”
- VirtualBox: Failed to open a session for the virtual machine……
- VirtualBox 无法启动,提示Failed to open a session for the virtual machine Windoze 7
- Win7启动Virtualbox时提示failed to open a session for the virtural machine
- Failed to get the installation date from registry:Error solution
- asp.net Operation failed, unable to locate the solution directory
- vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to lock
- VMWare遇到“Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to ”
- vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to lock
- vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to lock
- 多线程之GCD(Grand Central Dispatch)
- Map和Reduce处理过程分析
- C语言 使用结构体实现简单的通讯录
- js实现表格操作-排序
- Could not compile the mapping document: *******.hbm.xml 的解决方法
- solution for GRASS GIS 6.4.3 on linux failed to open the gui
- 蓝桥杯 水水搜索
- linux server的idle timeout情况整理(设置不好有可能会导致事故)
- 关于生成并发唯一性流水号的解决方案
- 初学EasyUI datagrid:如何用datagrid进行数据的查询
- Windows创建Mysql定时备份
- 金融系列6《借贷记交易流程》
- 验证非空,包括输入一堆空格。
- 第2章 感知机