Open Rbravo555 opened 4 years ago
@Rbravo555 I usually use apt command because it is more stable.
sudo apt install mayavi2
Indeed, using
sudo apt install mayavi2
allows to install the GUI in the RaspberryPi. However, when launching it, the terminal displays a number of errors
ubuntu@ubuntu:~/Desktop$ mayavi2 Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, *kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, *kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, *kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, *kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, *kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.PaintDC(window) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 5130, in init gdi.PaintDC_swiginit(self,gdi.new_PaintDC(*args, kwargs)) wx._core.PyAssertionError: C++ assertion "IsOk()" failed at ../src/common/dcgraph.cpp(437) in SetTextBackground(): wxGCDC(cg)::SetTextBackground - invalid DC ERROR|2020-02-10 09:02:21,320|error creating editor control <TVTK Scene 1> Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/workbench/workbench_window_layout.py", line 96, in add_editor self._wx_add_editor(editor, title) File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/workbench/workbench_window_layout.py", line 320, in _wx_add_editor editor_dock_control = self._wx_create_editor_dock_control(editor) File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/workbench/workbench_window_layout.py", line 441, in _wx_create_editor_dock_control self._wx_get_editor_control(editor) File "/usr/lib/python2.7/dist-packages/pyface/ui/wx/workbench/workbench_window_layout.py", line 509, in _wx_get_editor_control editor.control = editor.create_control(parent) File "/usr/lib/python2.7/dist-packages/tvtk/plugins/scene/scene_editor.py", line 61, in create_control self.scene = self._create_decorated_scene(parent) File "/usr/lib/python2.7/dist-packages/tvtk/plugins/scene/scene_editor.py", line 87, in _create_decorated_scene scene = DecoratedScene(parent, stereo=stereo) File "/usr/lib/python2.7/dist-packages/tvtk/pyface/ui/wx/decorated_scene.py", line 69, in init super(DecoratedScene, self).init(parent, traits) File "/usr/lib/python2.7/dist-packages/tvtk/pyface/ui/wx/scene.py", line 285, in init super(Scene, self).init(parent, *traits) File "/usr/lib/python2.7/dist-packages/tvtk/pyface/tvtk_scene.py", line 209, in init self.control = self._create_control(parent) File "/usr/lib/python2.7/dist-packages/tvtk/pyface/ui/wx/decorated_scene.py", line 107, in _create_control self._sizer.Layout() File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 14838, in Layout return core.Sizer_Layout(args, kwargs) PyAssertionError: C++ assertion "m_widget" failed at ../src/gtk/window.cpp(2878) in DoSetSize(): invalid window
(mayavi2:5444): Gtk-WARNING **: 09:02:21.365: Negative content width -6 (allocation 1, extents 4x3) while allocating gadget (node toolbar, owner GtkToolbar)
(mayavi2:5444): Gtk-WARNING **: 09:02:21.365: Negative content height -6 (allocation 1, extents 4x3) while allocating gadget (node toolbar, owner GtkToolbar)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 16765, in
lambda event: event.callable(*event.args, *event.kw) ) File "/usr/bin/mayavi2", line 520, in run process_cmd_line(self, options, args) File "/usr/bin/mayavi2", line 275, in process_cmd_line last_obj = script.new_scene() File "/usr/lib/python2.7/dist-packages/mayavi/plugins/script.py", line 84, in new_scene return self.engine.new_scene() File "/usr/lib/python2.7/dist-packages/apptools/scripting/recordable.py", line 45, in _wrapper result = func(args, **kw) File "/usr/lib/python2.7/dist-packages/mayavi/plugins/envisage_engine.py", line 92, in new_scene return self.scenes[-1] IndexError: list index out of range
On top of this, one cannot run the tests ( mlab.test_contour3d() ), not even import mayavi to python3.
If I understand correctly, you are not using CPython. You are probably using a variant of CPython which works on Raspberry Pi. Is that correct?
If you are using micropython or some other variant of CPython, you will probably not be able to use Mayavi. Like you mentioned, installing mayavi works fine until it reaches the vtk
part of the installation.
Collecting vtk (from mayavi) Could not find a version that satisfies the requirement vtk (from mayavi) (from versions: ) No matching distribution found for vtk (from mayavi)
Python tries to look for a vtk wheel that is compatible with the Python variant that you are using - which doesn't exist. That is because vtk is only built for CPython, if i understand correctly. See the wheels available on PyPI - https://pypi.org/project/vtk/#files
Good day,
I have tried to install Mayavi on a Pi 4 with 4 GB of RAM running ubuntu 19.10 64 bits. I used the command:
pip install mayavi
It all seems to go well, until it tries to download vtk from mayavi.
Any syggestions? How have others run mayavi on a raspberrypi?