mayavi
mayavi copied to clipboard
mayavi run error
hello, i find a main error when running based on mayavi:
ImportError: Could not import backend for traitsui. Make sure you
have a suitable UI toolkit like PyQt/PySide or wxPython
I find this error many times. it is so crazy!!!
my installization process is
conda create -n vis python=3.7
pip install vtk==8.1.2
pip install PyQt5
pip install mayavi
i find import mayavi # it is ok from mayavi import mlab # it is ok
mlab.figure() # it is not ok -----ImportError: Could not import backend for traitsui. Make sure you have a suitable UI toolkit like PyQt/PySide or wxPython
I try the PySide or wxPython, it's not ok also.
Can you help me find the solution?
Thanks~
Can you tell us what the ETS_TOOLKIT environment variable is on your machine? If the environment variable isn't set, you should set it according to the toolkit backend you installed e.g. ETS_TOOLKIT="qt" or ETS_TOOLKIT="wx" depending on whether your are using PySide or wxPython.
thank you for your reply.
i add export ETS_TOOLKIT="qt"
however, it's not ok , and error is
RuntimeError: No pyface.toolkits plugin could be loaded for qt
I try Pyside and PyQt5, they are not ok.
I apologize. ETS_TOOLKIT="qt4", not "qt"
For reference, here are the acceptable values for ETS_TOOLKIT
https://github.com/enthought/traitsui/blob/67ba31cdfd24a45d8f7047b093b8ec87c1db5f69/setup.py#L190-L196
https://github.com/enthought/pyface/blob/a55dfed5dc23a9363875310e6e3833c7d5294c38/setup.py#L205-L209
https://github.com/enthought/mayavi/blob/e2deb1218bfdf82bfcc939857495e27f73dd3442/setup.py#L460-L465
ImportError: Could not import backend for traitsui. Make sure you have a suitable UI toolkit like PyQt/PySide or wxPython installed.
For reference, here are the acceptable values for
ETS_TOOLKIThttps://github.com/enthought/traitsui/blob/67ba31cdfd24a45d8f7047b093b8ec87c1db5f69/setup.py#L190-L196 https://github.com/enthought/pyface/blob/a55dfed5dc23a9363875310e6e3833c7d5294c38/setup.py#L205-L209https://github.com/enthought/mayavi/blob/e2deb1218bfdf82bfcc939857495e27f73dd3442/setup.py#L460-L465
Hello! My environment is ubuntu18.04, python 3.7.When I use mayavi to visualize the point cloud, the following error appears:
ImportError: Could not import backend for trainsui Make sure you have a suitable UI toolkit like PyQt/PySide or wxPython installed.

But I have installed the required dependencies.

I also defined the path of environment variables according to your suggestions to others:

But this problem still exists. It's been bothering me for a long time. It's crazy. Could you help me?Thank you very much,sorry for your inconvenience.