Search code examples
python-2.7spydermayavi

ImportError: No module named traits.api


I have installed mayavi to spyder in windows 7 and when I am trying to import mlab I get a strange warning:

ImportError: No module named traits.api

Does anybody have experienced the same problem? Any suggestions? Thanks a lot in advance.


Solution

  • Ok, I found a very useful post which solved the issue. The problem was that I had set PATH variable for searching for the basetsd.h instead of INCLUDE (C:\Program Files\Microsoft SDKs\Windows\v7.0\Include). Moreover, I set LIB for C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib.

    Now I can successfully run mayavi on windows 7 and Spyder. However, I cannot run it from IPython :(