ImportError: No module named traits.api

5.2k Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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 :(

2
On

You need to install the mayavi dependencies VTK, appinst, apptools, envisage, traitsui, traits, pyface, configobj