Search code examples
ubuntufailed-installationmayavi

Got Error while Running Mayavi after installing it in Ubuntu


I want to install mayavi in ubuntu ,I install it successfully,but when i run mayavi2 ,it said:

Traceback (most recent call last):
  File "/usr/local/bin/mayavi2", line 7, in <module>
    from mayavi.scripts.mayavi2 import main
  File "/usr/local/lib/python2.7/dist-packages/mayavi/scripts/mayavi2.py",
line 494, in <module>
    raise ImportError(msg)
ImportError: No module named envisage.ui.workbench.api
Could not load envisage. You might have a missing dependency.

Do you have the EnvisageCore and EnvisagePlugins installed?

If you installed Mayavi with easy_install, try 'easy_install '. 'easy_install Mayavi[app]' will also work.

If you performed a source checkout and installed via 'python setup.py develop', be sure to run the same command in the EnvisageCore and EnvisagePlugins folders.

If these packages appear to be installed, check that your numpy and configobj are installed and working. If you need numpy, 'easy_install numpy' will install numpy. Similarly, 'easy_install configobj' will install configobj.

I don't know what to do? help!


Solution

  • Ubuntu 14.04 ships mayavi. Use that version unless you have a strong reason to do otherwise and are willing to go a bit further in installation issues.

    First you need to remove pip-installed packages from your system path. Else you are at risk of mismatched versions of packages and have little recourse for fixing these problems.

    Steps:

    1. Remove pip-installed mayavi

      sudo pip uninstall mayavi
      
    2. Remove other packages that pip might have installed. For this, it will be useful if you remember or still have the console that has installed mayavi.

    3. Install the system-provided mayavi

      sudo apt-get install mayavi2