OS: Linux Kubuntu 14.4.5
Python: Python 3.5.2 :: Continuum Analytics, Inc.
I tried to install Mayavi into my anaconda environment:
conda install -c menpo mayavi=4.5.0
conda install -c anaconda wxpython=3.0.0.0
conda install pyqt
conda install qt
But when I try to run the example from http://docs.enthought.com/mayavi/mayavi/auto/example_surface_from_irregular_data.html I get the error message
ImportError: Could not import backend for traits
with the explanation:
Make sure that you have either the TraitsBackendWx or the TraitsBackendQt projects installed. If you installed Mayavi with easy_install, try easy_install . easy_install Mayavi[app] will also work.
If you performed a source checkout, be sure to run 'python setup.py install' in Traits, TraitsGUI, and the Traits backend of your choice.
Also make sure that either wxPython or PyQT is installed. wxPython: http://www.wxpython.org/ PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro
I searched the web and tried to find anything to setup, but couldn't find anything.
From http://docs.enthought.com/mayavi/mayavi/installation.html?highlight=installation I got that I could install it via pip with pip install mayavi
, but that resulted only in the messages that "Requirement already satisfied", among which is
Requirement already satisfied: traits in /anaconda2/envs/myenv/lib/python3.5/site-packages (from mayavi)
What to do?
The following steps worked for me (in a python2 environment):
conda create -yn mayavitest
source activate mayavitest
conda install -yc menpo mayavi=4.5.0
conda install -y pyside
conda install qt
ETS_TOOLKIT=qt4 python /path/to/mayavi-example.py
The installation of pyside might downgrade qt, that is why qt needs to be installed again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With