运行 Mayavi 在 Ubuntu 中安装后出现错误

Got Error while Running Mayavi after installing it in Ubuntu

我想在ubuntu中安装mayavi,我安装成功了,但是当我运行 mayavi2时,它说:

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.

不知道怎么办?求助!

Ubuntu 14.04 船 mayavi。除非您有充分的理由不这样做并且愿意在安装问题上更进一步,否则请使用该版本。

首先,您需要从系统路径中删除 pip 安装的软件包。否则您将面临软件包版本不匹配的风险,并且几乎无法解决这些问题。

步骤:

  1. 删除 pip 安装的 mayavi

    sudo pip uninstall mayavi
    
  2. 删除 pip 可能安装的其他包。为此,如果您还记得或仍然拥有安装了mayavi的控制台,它将很有用。

  3. 安装系统自带的mayavi

    sudo apt-get install mayavi2