mayavi2 command not found

In this troubleshooting guide we learn how to fix mayavi2 command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

mayavi2: command not found

or when using sudo you get the following error message

sudo: mayavi2: command not found

Solutions to mayavi2: command not found

How To Fix mayavi2: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu mayavi2 is provided by mayavi2 package.

mayavi2 is:

MayaVi2 is a cross-platform tool for 2-D and 3-D scientific data visualization. Its features include:

  • Visualization of scalar, vector and tensor data in 2 and 3 dimensions
  • Easy scriptability using Python
  • Easy extendability via custom sources, modules, and data filters
  • Reading several file formats: VTK (legacy and XML), PLOT3D, etc.
  • Saving of visualizations
  • Saving rendered visualization in a variety of image formats.

MayaVi2 has been designed with scriptability and extensibility in mind. While the mayavi2 application is usable by itself, it may be used as an Envisage plugin which allows it to be embedded in user applications natively. Alternatively, it may be used as a visualization engine for any application.

This package also provides TVTK, which wraps VTK objects to provide a convenient, Pythonic API, while supporting Traits attributes and NumPy/SciPy arrays. TVTK is implemented mostly in pure Python, except for a small extension module.

To fix this problem, we can install more using the command below.

sudo apt-get -y install mayavi2

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install mayavi2.

sudo apt -y install mayavi2

Or if you have aptitude installed you can use the following command.

sudo aptitude install mayavi2

Summary

In this tutorial we learn how to fix mayavi2 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.