我已经在运行mint18.264的Linux机器上安装了vpython7。在尝试导入visual时,使用iPython环境和python2.7.12收到以下回溯。在
In [1]: from visual import *
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-96658a14bb68> in <module>()
----> 1 from visual import *
/usr/lib/python2.7/dist-packages/visual/__init__.pyc in <module>()
64 frame, pyramid, ellipsoid, curve, faces, convex, helix,
65 points, distant_light, local_light)
---> 66 from visual.ui import display
67 import materials
68
/usr/lib/python2.7/dist-packages/visual/ui.py in <module>()
1 import cvisual
2 from primitives import distant_light, local_light
----> 3 import materials
4
5 # Code to provide special initialization for a display object, and overloaded
/usr/lib/python2.7/dist-packages/visual/materials.py in <module>()
150 texturePath = os.path.split( __file__ )[0] + "/"
151 data = loadTGA(texturePath+"turbulence3") # the targa file is 512*512*3
--> 152 tx_turb3 = raw_texture( data=reshape(data,(64,64,64,3)), interpolate=True, mipmap=False )
153 tx_wood = raw_texture( data=loadTGA(texturePath+"wood"), interpolate=True)
154
/usr/lib/python2.7/dist-packages/visual/materials.py in __init__(self, **kwargs)
68 cvisual.texture.__init__(self)
69 for key, value in kwargs.iteritems():
---> 70 self.__setattr__(key, value)
71
72 class shader_material(cvisual.material):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
我不知道为什么这个包裹拒绝正确进口。有人见过这个错误,知道原因吗?在
VPython看起来已经过时了。repository上次激活是在2012年,它有一个指向another repository的链接,该链接也已弃用:
我建议再次尝试上述的^{} ,以获得最新的和最好的,并从那里开始工作。在
相关问题 更多 >
编程相关推荐