Open tom-wood opened 7 years ago
I have the same issue as @tom-wood when loading from mayavi import mlab
Gdk-WARNING **: /build/gtk+2.0-KsZKkB/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window
These are just warnings, not error msgs. The program runs smoothly.
I have similar problems being unable to import mlab: I install mayavi with sudo apt-get install mayavi
and when I try to import with "from mayavi import mlab" I get:
In [61]: from mayavi import mlab Changing backend to Qt for Mayavi
ERROR: execution aborted
In [62]: %gui inline In [61]: %gui qtTraceback (most recent call last):
File "
File "/usr/local/lib/python2.7/dist-packages/mayavi/mlab.py", line 27, in
File "/usr/local/lib/python2.7/dist-packages/mayavi/tools/camera.py", line 25, in
File "/usr/local/lib/python2.7/dist-packages/mayavi/tools/engine_manager.py", line 14, in
File "/usr/local/lib/python2.7/dist-packages/mayavi/core/engine.py", line 28, in
File "/usr/local/lib/python2.7/dist-packages/mayavi/core/base.py", line 19, in
File "/usr/local/lib/python2.7/dist-packages/tvtk/pyface/tvtk_scene.py", line 28, in
File "/usr/local/lib/python2.7/dist-packages/tvtk/pyface/light_manager.py", line 130, in
File "/usr/local/lib/python2.7/dist-packages/tvtk/pyface/light_manager.py", line 146, in CameraLight source = Instance(tvtk.Light, ())
File "tvtk_classes/tvtk_helper.py", line 206, in
File "tvtk_classes/tvtk_helper.py", line 36, in get_class mod = get_module(fname)
File "tvtk_classes/tvtk_helper.py", line 28, in get_module mod = import('tvtk.tvtk_classes.%s'%fname, globals(), locals(), [fname])
File "tvtk_classes/light.py", line 12, in
File "/usr/local/lib/python2.7/dist-packages/tvtk/array_handler.py", line 28, in
ImportError: cannot import name set_id_type_array
I've installed mayavi using apt in Ubuntu 16.04 [sudo apt install mayavi2]. Unfortunately when trying to use, mlab seems to fail. I get the following error when running
ipython --gui=qt
:In[1]: from mayavi import mlab
(python:127406): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
When running
ipython --gui=wx
:In[1]: from mayavi import mlab
In[2]: mlab.figure()
ipython:127461): Gdk-WARNING **: /build/gtk+2.0-KsZKkB/gtk+2.0-2.24.30/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window
(this warning repeats 7 times before:)Out[2]: < mayavi.core.scene.Scene at 0x7f14001eaef0>
I've run the nosetests for mayavi/tests and tvtk/tests and have attached the outputs along with the output for typing
mayavi2 -t
on the command line. mayavi2-t.txt nose_mayavi.txt nose_tvtk.txtI've reproduced the same error(s) in Linux Mint 18 (Sarah), which is built on top of Ubuntu 16.04. The mayavi2 was just downloaded from the universe repository, so it's version 4.4.3-2.1.
Any help much appreciated.