enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 284 forks source link

Mayavi not starting using Pyface 7.4.0, PySide6 and Apple M1 #1128

Open JaRoSchm opened 2 years ago

JaRoSchm commented 2 years ago

Hi,

after today's release of Pyface 7.4.0 which is the first version supporting PySide6, I tried this out on my MacBook with an M1 CPU. PySide6 / Qt 6 is the only version supported natively on M1 currently. However, Mayavi does not start (using "mayavi2") with Pyface 7.4.0 and Pyside6 installed. A simple test application using Pyface works without problems.

Here is the traceback:

Traceback (most recent call last):
  File "/Users/jan/miniforge3/envs/CPG_stable/bin/mayavi2", line 5, in <module>
    from mayavi.scripts.mayavi2 import main
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/mayavi/scripts/mayavi2.py", line 462, in <module>
    from mayavi.plugins.app import Mayavi, setup_logger
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/mayavi/plugins/app.py", line 19, in <module>
    from .mayavi_workbench_application import MayaviWorkbenchApplication
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/mayavi/plugins/mayavi_workbench_application.py", line 17, in <module>
    import mayavi.api
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/mayavi/api.py", line 2, in <module>
    from mayavi.core.engine import Engine
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/mayavi/core/engine.py", line 33, in <module>
    from mayavi.core.ui.mayavi_scene import viewer_factory
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/mayavi/core/ui/mayavi_scene.py", line 12, in <module>
    from tvtk.tools.ivtk import IVTK
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/tvtk/tools/ivtk.py", line 35, in <module>
    from tvtk.pyface.api import Scene, DecoratedScene
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/tvtk/pyface/api.py", line 1, in <module>
    from .decorated_scene import DecoratedScene
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/tvtk/pyface/decorated_scene.py", line 13, in <module>
    DecoratedScene = toolkit_object('decorated_scene:DecoratedScene')
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/pyface/base_toolkit.py", line 127, in __call__
    module = import_module(mname, package)
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/tvtk/pyface/ui/qt4/decorated_scene.py", line 21, in <module>
    from .scene import Scene, popup_save
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/tvtk/pyface/ui/qt4/scene.py", line 40, in <module>
    from .QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
  File "/Users/jan/miniforge3/envs/CPG_stable/lib/python3.9/site-packages/tvtk/pyface/ui/qt4/QVTKRenderWindowInteractor.py", line 85, in <module>
    from PySide.QtGui import QWidget, QSizePolicy, QApplication, QWheelEvent
ModuleNotFoundError: No module named 'PySide'
corranwebster commented 2 years ago

This is, unfortunately, expected. PySide6 support is still experimental in Pyface, and we need to update TraitsUI, Envisage, Apptools, and Mayavi to PySide6 as well, which is likely to take some weeks.

JaRoSchm commented 2 years ago

Thank you very much! I'm looking forward to that.