- Ubuntu 14.04 LTS
- Anaconda 3.7.4 with python 2.7
- wxpython 3.0.0
- vtk 5.10.1
Traceback (most recent call last): File "sample.py", line 44, in __init__ wxVTKRenderWindow.\_\_init\_\_(self, parent, ID, *args, **kw) File "$HOME/anaconda/lib/python2.7/site-packages/vtk/wx/wxVTKRenderWindow.py", line 194, in __init__ attribList=[wx.glcanvas.WX_GL_DOUBLEBUFFER]) File "$HOME/anaconda/lib/python2.7/site-packages/wx-3.0-gtk2/wx/glcanvas.py", line 106, in __init__ _glcanvas.GLCanvas_swiginit(self,_glcanvas.new_GLCanvas(*args, **kwargs)) TypeError: Argument given by name ('attribList') and position (3)
This is because of the version of wxPython.
vtk supposes wxPython's version to be >= 2.9.
see :
https://groups.google.com/forum/#!topic/wxpython-users/MxJPxlOS05A
Mesh collapse and object disorder occur.
This is because of depth buffer bit size of wxpython.glcanvas.
see :
https://groups.google.com/forum/#!topic/wxpython-users/lbzhzaBNkxQ
edit $HOME/anaconda/lib/python2.7/site-packages/vtk/wx/wxVTKRenderWindow.py :: line 193:
- change the order of arguments (attribList)
- add "wx.glcanvas.WX_GL_DEPTH_SIZE,16" to attribList
- baseClass.__init__(self, parent, ID, position, size, style, attribList=[wx.glcanvas.WX_GL_DOUBLEBUFFER]) + baseClass.__init__(self, parent, ID, [wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_DEPTH_SIZE, 16], position, size, style)