Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 685
GioR Avatar asked Oct 19 '22 22:10

GioR


2 Answers

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

like image 125
Jonathan March Avatar answered Oct 22 '22 21:10

Jonathan March


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

like image 31
GioR Avatar answered Oct 22 '22 23:10

GioR