Question

I'm trying to run a standard Mayavi example. I just installed mayavi2 on Ubuntu (Kubuntu 12.04) and this is my first step with Mayavi. Unfortunately, this step is failing.

The examples I wish to run come from here: http://docs.enthought.com/mayavi/mayavi/auto/examples.html For example, this one.

The behavior I am seeing is that the plot canvas area is blank (mostly). The popup window is shown and its controls are present and working.

The only errors I am seeing are:

libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.

Where would I add LIBGL_DEBUG=verbose?

I'm on Kubuntu 12.04 with:

  • Python 2.7.3
  • IPython 1.1.0
  • wxPython 2.8
  • vtk 5.8.0-5
  • setuptools, numpy, scipy - latest versions (just updated)

I am running the examples in IPython (which seems to be the recommended way). I am using this command to start the shell:

ipython --gui=wx --pylab=wx

I also tried running the examples from within an IPython notebook as so:

%run example.py

In all cases the examples fail to display the animation. The window itself is display as are the controls. But the animation canvas is mostly blank, although a flash of the images will sometimes appear.

At least once previously I saw my attempts crash Python. The message was:

The crashed program seems to use third-party or local libraries: /usr/local/lib/python2.7/dist-packages/traits/ctraits.so /usr/local/lib/python2.7/dist-packages/tvtk/array_ext.so

However, I am not seeing that crash now.

Was it helpful?

Solution

I found some important clues here:

https://askubuntu.com/questions/283640/libgl-error-failed-to-load-driver-i965

Like that person, I ended up reinstalling my graphics driver and that solved my problem. (The problem wasn't related to mayavi or python after all.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top