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

后端 未结 3 399
温柔的废话
温柔的废话 2021-01-02 08:54

I am unable to run/use Mayavi library from within Spyder IDE. I have described the problem below. Any help will be very useful. (Thank you very much in advance.)

相关标签:
3条回答
  • 2021-01-02 09:11

    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!

    0 讨论(0)
  • 2021-01-02 09:17

    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.

    0 讨论(0)
  • 2021-01-02 09:34

    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.

    0 讨论(0)
提交回复
热议问题