3

我看到以下问题:

在[5]中:img = open_image("2018-09-21_005.hdr")

在 [6] 中:view_cube(img,bands=[29, 19, 9])

ModuleNotFoundError Traceback(最近一次调用最后)/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spectral/graphics/hypercube.py 在 69 尝试:---> 70 import wx 71从 wx 导入 glcanvas

ModuleNotFoundError:没有名为“wx”的模块

在处理上述异常的过程中,又出现了一个异常:

----> 1 view_cube(img, band=[29, 19, 9]) 中的 ImportError Traceback (最近一次调用最后一次)

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spectral/graphics/graphics.py in view_cube(data, *args, **kwargs) 176 接受键盘输入。177 ''' --> 178 从spectral.graphics.hypercube 导入HypercubeWindow 179 180 如果不是running_ipython():

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spectral/graphics/hypercube.py in 71 from wx import glcanvas 72 except ImportError: ---> 73 raise ImportError("必需依赖 wx.glcanvas 不存在") 74 75 DEFAULT_WIN_SIZE = (500, 500) # 图像帧的默认尺寸

ImportError:所需的依赖 wx.glcanvas 不存在

我使用以下命令安装 wx:“brew install wxpython”

4

1 回答 1

0

The problem was related to installation of python package

Use following command to install by pip :

pip install wxpython

And Use following command to install by conda environment :

conda install wxpython

于 2019-05-24T14:34:43.213 回答