mayavi 4.7.1 doesn't seem to work on Python 3.9

Created on 9 Jul 2020  ·  3Comments  ·  Source: enthought/mayavi

This is directly related to https://github.com/enthought/mayavi/issues/939 and the fact that vtk 8 wheels are not available for Python 3.9. I'm not sure if the vtk 8 wheels cannot be built for Python 3.8 or have not been built for Python 3.8.

bug

Most helpful comment

This is solved for me. Here is how it is done:

  • install VTK 9.0 first. for mac is like brew install vtk
  • $ git clone https://github.com/enthought/mayavi.git
  • in mayavi/requirements.txt, remove the line of vtk
  • in mayavi/mayavi/__init__.py, remove 'vtk' from __requires__

Then finish installation as guided:

$ pip install -r requirements.txt
$ pip install PyQt5  # replace this with any supported toolkit
$ python setup.py install  # or develop

All 3 comments

There's a patch for VTK 8.2 source to make compatible with Python 3.8 (and probably Python 3.9). The fixes have been applied to VTK 9.0 source already (no VTK 8.3 release seems to be in the works). There are, however, Mayavi compatibility issues with VTK 9.0 which I know have been reported separately, here, and are being worked on (thanks!).

See the VTK issue (and link to patch download therein): https://gitlab.kitware.com/vtk/vtk/-/issues/17670

I can confirm that this patch enables me to build VTK 8.2 against Python 3.8.3 (and QT5.14.2, PyQt5-5.13.2, NumPy 1.19.0/MKL2020.1) and it works with Mayavi 4.7.1. Tested on Ubuntu 16.04, 18.04, 20.04 and MacOSX Catalina 10.15.5 (no testing on Windows 10 native, only WSL 2 which works well).

This should be fixed in latest master

This is solved for me. Here is how it is done:

  • install VTK 9.0 first. for mac is like brew install vtk
  • $ git clone https://github.com/enthought/mayavi.git
  • in mayavi/requirements.txt, remove the line of vtk
  • in mayavi/mayavi/__init__.py, remove 'vtk' from __requires__

Then finish installation as guided:

$ pip install -r requirements.txt
$ pip install PyQt5  # replace this with any supported toolkit
$ python setup.py install  # or develop

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rpep picture rpep  ·  7Comments

stefanoborini picture stefanoborini  ·  11Comments

ktavabi picture ktavabi  ·  15Comments

aestrivex picture aestrivex  ·  9Comments

igamenovoer picture igamenovoer  ·  7Comments