导入“from visual import *”时出错

导入“from visual import *”时出错

我已经python-visual使用以下方式安装:

sudo apt-get install python-visual
sudo apt-get install libgtkglextmm-x11-1.2-dev

当我尝试执行以下操作时显示此错误import visual

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/visual/__init__.py", line 66, in <module>
from visual.ui import display
File "/usr/lib/python2.7/dist-packages/visual/ui.py", line 3, in <module>
import materials
File "/usr/lib/python2.7/dist-packages/visual/materials.py", line 152, in <module>
tx_turb3 = raw_texture( data=reshape(data,(64,64,64,3)), interpolate=True, mipmap=False )
File "/usr/lib/python2.7/dist-packages/visual/materials.py", line 70, in __init__
self.__setattr__(key, value)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

答案1

我通过安装较新版本的python-visual和解决了这个问题libgtkglextmm

相关内容