Errorr install mayavi in Jetson TX2

Dear Expertise!

I’m having a problem while install mayavi in Jetson TX2. I’m trying to solve this error for several days unfortunately it stills not success yet, I’m looking forward to receive the advice from your site. Thank you in advance!

  1. I install “vtk” by source as the link: https://vtk.org/Wiki/VTK/Building/Linux

  2. After that I install mayavi inside the python virtual environment by command: “pip install mayavi”
    The error appeared as below:
    (jetsontx2_env) tony@dovanhuong:~$ pip install mayavi
    Collecting mayavi
    Using cached mayavi-4.7.1.tar.bz2 (7.0 MB)
    Requirement already satisfied: apptools in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (4.5.0)
    Requirement already satisfied: envisage in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (4.9.2)
    Requirement already satisfied: numpy in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (1.19.1)
    Requirement already satisfied: pyface>=6.1.1 in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (7.0.1)
    Requirement already satisfied: pygments in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (2.6.1)
    Requirement already satisfied: traits>=4.6.0 in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (6.1.1)
    Requirement already satisfied: traitsui>=6.0.0 in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (7.0.1)

    ERROR: Could not find a version that satisfies the requirement vtk (from mayavi) (from versions: none)
    ** ERROR: No matching distribution found for vtk (from mayavi)**

VTK like not support Python3, have a try pip2 install mayavi

Hi expertise,

When I tested VTK after install i think it worked as below:

tony@dovanhuong:~$ python
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import vtk
quit()
tony@dovanhuong:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import vtk
quit()

However, when I install mayavi it appeared the error as description in above!

hi @ShaneCCCemphasized text ,

When I implemented your advice, the error appeared the same as below:
tony@dovanhuong:~$ pip2 install mayavi
Collecting mayavi
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/08/ea/eb808cb4df8f92bc4d9f9a1ef14566b9b5d60370e6ecbaf9061cdae335fa/mayavi-4.7.1.tar.bz2 (7.0MB)
100% |████████████████████████████████| 7.0MB 89kB/s
Collecting apptools (from mayavi)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/aa/9e/a09c342e9dc07f68c12328ade30dd5d28347734091b8827ba53129e65eb3/apptools-4.5.0.tar.gz (297kB)
100% |████████████████████████████████| 307kB 1.6MB/s
Collecting envisage (from mayavi)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/02/00/e54d8835ee8fd4924477281d3b93023505f816a8578a22744f256250b7be/envisage-4.9.2.tar.gz (518kB)
100% |████████████████████████████████| 522kB 1.0MB/s
Collecting numpy (from mayavi)
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/b7/6f/24647f014eef9b67a24adfcbcd4f4928349b4a0f8393b3d7fe648d4d2de3/numpy-1.16.6.zip (5.1MB)
100% |████████████████████████████████| 5.2MB 127kB/s
Collecting pyface>=6.1.1 (from mayavi)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/a0/0a/7d4f6081626046766c5bca605a1383b25519c20fcfb4a05499002bf2af4e/pyface-7.0.1.tar.gz (5.4MB)
100% |████████████████████████████████| 5.4MB 123kB/s
Collecting pygments (from mayavi)
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl (896kB)
100% |████████████████████████████████| 901kB 687kB/s
Collecting traits>=4.6.0 (from mayavi)
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/4b/2d/b9add8861abe5c85b771005a0dc34c2f91aaf8ee97d38f79b9457b97b434/traits-5.2.0.tar.gz (423kB)
100% |████████████████████████████████| 430kB 1.3MB/s
Collecting traitsui>=6.0.0 (from mayavi)
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/80/54/a71d7d8deea2b25f1cd1ed08f7a7508a3fc8c8f8447fde548e65e1fd9e6b/traitsui-7.0.1.tar.gz (5.2MB)
100% |████████████████████████████████| 5.2MB 122kB/s
Collecting vtk (from mayavi)
Cache entry deserialization failed, entry ignored
Could not find a version that satisfies the requirement vtk (from mayavi) (from versions: )
No matching distribution found for vtk (from mayavi)

Could you try this.

sudo apt-get install mayavi2

Hi @ShaneCCC!

When I applied your command, it worked!
Unfortunately, when I execute with python for import mayavi packages, it is not imported success:

(jetsontx2_env) tony@dovanhuong:~/inference_jetson_tx2_yolo_complex/src$ python
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import mayavi
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘mayavi’

quit()

Expertise, what should I do?

Have a try below solution.

https://python.developreference.com/article/14235694/Ipython+error+“+No+module+named+‘mayavi’+”

Hello @ShaneCCC!
I tried with the link you sent, unfortunately, it was not success and the error still the same. I used Python Virtual environment:
(jetsontx2_env) tony@dovanhuong:~$ pip install mayavi
Collecting mayavi
Using cached mayavi-4.7.1.tar.bz2 (7.0 MB)
Requirement already satisfied: apptools in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (4.5.0)
Requirement already satisfied: envisage in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (4.9.2)
Requirement already satisfied: numpy in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (1.19.1)
Requirement already satisfied: pyface>=6.1.1 in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (7.0.1)
Requirement already satisfied: pygments in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (2.6.1)
Requirement already satisfied: traits>=4.6.0 in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (6.1.1)
Requirement already satisfied: traitsui>=6.0.0 in ./jetsontx2_env/lib/python3.6/site-packages (from mayavi) (7.0.1)
ERROR: Could not find a version that satisfies the requirement vtk (from mayavi) (from versions: none)
ERROR: No matching distribution found for vtk (from mayavi)

In addition, If I try to install “VTK” via “pip install vtk” inside the python virtual environment, it have the same error as below:

(jetsontx2_env) tony@dovanhuong:~$ pip install vtk
ERROR: Could not find a version that satisfies the requirement vtk (from versions: none)
ERROR: No matching distribution found for vtk

Dear expert @ShaneCCC!
Do you have any idea or solution?
Thank you so much~~~

Like I said before it only support for python2.
Have a try python2 to import it after apt install it.

Hello @ShaneCCC ello @ expert!

I tried with your suggestion and recomendation, unfortunately it was not success to install in python2 environment for both VTK and “mayavi” packages. The error shown as below:

(python2_env) tony@dovanhuong:~ pip install vtk DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support ERROR: Could not find a version that satisfies the requirement vtk (from versions: none) ERROR: No matching distribution found for vtk WARNING: You are using pip version 20.2.1; however, version 20.2.2 is available. You should consider upgrading via the '/home/tony/python2_env/bin/python -m pip install --upgrade pip' command. (python2_env) tony@dovanhuong:~ pip install mayavi
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting mayavi
Using cached mayavi-4.7.1.tar.bz2 (7.0 MB)
Collecting apptools
Using cached apptools-4.5.0.tar.gz (297 kB)
Collecting envisage
Using cached envisage-4.9.2.tar.gz (518 kB)
Collecting numpy
Using cached numpy-1.16.6.zip (5.1 MB)
Collecting pyface>=6.1.1
Using cached pyface-7.0.1.tar.gz (5.4 MB)
Collecting pygments
Using cached Pygments-2.5.2-py2.py3-none-any.whl (896 kB)
Collecting traits>=4.6.0
Using cached traits-5.2.0.tar.gz (423 kB)
Collecting traitsui>=6.0.0
Using cached traitsui-7.0.1.tar.gz (5.2 MB)
ERROR: Could not find a version that satisfies the requirement vtk (from mayavi) (from versions: none)
ERROR: No matching distribution found for vtk (from mayavi)
WARNING: You are using pip version 20.2.1; however, version 20.2.2 is available.
You should consider upgrading via the ‘/home/tony/python2_env/bin/python -m pip install --upgrade pip’ command.

I am doing like below.

sudo apt-get install mayavi2
nvidia@nvidia-desktop:~$ python2
Python 2.7.17 (default, Jul 20 2020, 15:37:01)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mayavi
>>>
1 Like

Hello @ShaneCCC expert!

I followed with your instructed and it’s worked~~

However, I would like to import mayavi in python2 virtual environment, it was not successed. The error as below:
tony@dovanhuong:~$ python2
Python 2.7.17 (default, Jul 20 2020, 15:37:01)
[GCC 7.5.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import mayavi
quit()
tony@dovanhuong:~ source python2_env/bin/activate (python2_env) tony@dovanhuong:~ python2
Python 2.7.17 (default, Jul 20 2020, 15:37:01)
[GCC 7.5.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import mayavi
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named mayavi

do you have any suggestion or recommend how to import that packages inside python virtual environment?
Thanks expert so much~~~

Sorry, I am not familiar with python virtual environment, you may need to check this on python forum or have googling it to get the proper solution.

1 Like

Thanks expert for your recommendation. I’ll try to find the solutions by googling~!