solution for GRASS GIS 6.4.3 on linux failed to open the gui
2015-04-07 17:24
585 查看
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= """
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."""
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/
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 the
Numeric 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/
相关文章推荐
- vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to lock the file.
- genymotion报错:Failed to open a session for the virtual machine,Unable to load R3 module xxxx/VBoxDD.D
- VirtualBox 无法启动,提示Failed to open a session for the virtual machine Windoze 7
- How to improve the performance networking (TCP & UDP) on Linux 2.4+ for high-bandwidth applications
- VirtualBox: Failed to open a session for the virtual machine……
- vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to lock
- 在VirtualBox中安装Ubuntu14报错:Failed to open a session for the virtual machine,Unable to load R3……
- The solution of Websphere create profiles failed on Linux
- How to Maximise CPU Performance for the Oracle Database on Linux
- Cannot open your default e-mail folders. The attempt to log on to Microsoft Exchange has failed.
- 运行Virtualbox去安装系统时出错:Failed to open a session for the virtual machine,Unable to load R3 module xxxx/VBoxDD.DLL(VBoxDD)
- Failed to opena session for the virtual machine,Unable to load R3
- 解决 Linux下oracle导入(imp)导出(exp)出现"failed to open ...for reader/wirte" 错误
- 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot – please use a kernel appropriate for your CPU"(安装深度Linux的时候就需要)
- Yii CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user
- Win7启动Virtualbox时提示failed to open a session for the virtural machine
- [Ubuntu] Failed to open a session for the virtual machine win7
- Linux:Failed to get exclusive lock on the configuration file
- virtualbox学习之“failed to open a session for the virtual machine”