Knowledge Base/Specific Canopy/EPD Packages

VTK/Mayavi on Mac OS X

Prabhu Ramachandran
posted this on March 20, 2013 10:23


Use Qt, not wx.

For example, to run the mayavi application:

ETS_TOOLKIT=qt4 mayavi2


All Enthought Tool Suite packages are designed to work with both Qt and wxPython backends (GUI libraries).  On Windows and Linux this works well; one may switch between backends and  everything works correctly.  Unfortunately,  there is a problem with VTK (and hence Mayavi) on Mac OS X.  Qt is built using Mac OS X's newer Cocoa framework, whereas wxPython 2.8.x is built using the older Carbon framework.  wxPython 2.9.x is built with Cocoa but because of API changes, is not well supported by ETS.  In addition, Carbon applications do not work on 64 bit applications.  As a result wxPython-2.8.x is not usable on Mac OS X 64 bit.

Now VTK can be built with either Cocoa or Carbon but not both.  Recent version of Mayavi (from version 4.3 of ETS) work well with the Qt backend. In order to preserve uniformity between 32 bit Mac and 64 bit Mac EPD installations, we now build VTK with Cocoa support on both platforms.  This will work correctly with the Qt backend on both 32 and 64 bit installations of EPD.  Unfortunately, this means that one cannot run VTK/Mayavi with wxPython anymore.  If this is needed on 32 bit EPD installs, we recommend that you downgrade to the previous VTK release as follows:

enpkg VTK-5.6.0-3

This will give you the older VTK build which work correctly with wxPython but not with Qt.




User photo
Scott Harris

Do you know how to get wxVTKRenderWindowInteractor working with Canopy? I tried moving my VTK back with the above command, but I only get a blank window.

September 14, 2013 15:50
User photo
Scott Harris

I hit return too soon. I'm using OS X 10.8. 

September 14, 2013 15:53