Mayavi doesn't run from within Spyder: complains about “ValueError: API 'QString' …”

时光怂恿深爱的人放手 提交于 2019-11-30 12:59:46
Indranil Sinharoy

Thanks Avaris for your response.

I have a solution for now (I am not sure of it as a "fix"). I modified the following setting in Tools->Preferences->Console->External Modules->Enthought Tool Suite->ETS_TOOLKIT: change from Qt4 to wx. After changing this setting, I am able to execute code with Mayavi library and Mayavi plots directly from within Spyder.

Scott Yang

for linux users, the answer by imranal in this issues can be referenced to.

just add export ETS_TOOLKIT=qt4 to a new line in ~/.bashrc will do the trick. don't forget to source the ~/.bashrc file!

According to this and this the error can be fixed by activating the Ignore API change errors (sip.setapi) checkbox in Preferences > Console > External Modules.

I have tested that it does work with Spyder 2.1.11.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!