Clash Royale CLAN TAG#URR8PPP
How to install mayavi on Colab?
I tried installing mayavi on Colab using pip:
!pip install mayavi
This threw the following error:
Running setup.py bdist_wheel for mayavi ... error
The rest of the error output is available at the Colab document.
Solution: Work in Progress
Following the response from @Bob-Smith, I found that his solution needed a slight change for installing the dependencies:
!apt-get install vtk6
!apt-get install libvtk6-dev python-vtk6
!apt-get install vtk6
!apt-get install libvtk6-dev python-vtk6
Problems Faced and Workaround Found (PFWF)
PFWF-001 !apt-get install python-vtk
throws the following error:
!apt-get install python-vtk
Package 'python-vtk' has no installation candidate
I found a command-reference for this:
!apt-get install libvtk5-dev python-vtk
!apt-get install libvtk5-dev python-vtk
However, this command also did not work. The package name had changed from libvtk5-dev
to libvtk6-dev
and the python binding for VTK has changed from python-vtk
to python-vtk6
. Clearly this kind of change will continue to happen in future and you may need to check the package name and the python binding for VTK before running the following statement:
libvtk5-dev
libvtk6-dev
python-vtk
python-vtk6
!apt-get install libvtk6-dev python-vtk6
!apt-get install libvtk6-dev python-vtk6
Note: If you are here looking to solve VTK installation problems for python and this does not solve that you may want to look here: installing-vtk-for-python
Installing mayavi
still throws error:
Although the two steps above install the dependencies, the last line: !pip install mayavi
spits out the following error:
mayavi
!pip install mayavi
Could not connect to any X display.
1 Answer
1
You'll first need to install deps. Run
!apt-get install vtk6
!apt-get install python-vtk
!pip install mayavi
If you've attempted to import myavi
before installing the deps, you may need to restart you runtime before executing the !pip install myavi
command using the Runtime -> Restart runtime menu.
myavi
!pip install myavi
!pip install mayavi
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Thank you @BobSmith. "!apt-get install python-vtk" did not execute without error. Source was not available.
– CypherX
yesterday