简体   繁体   中英

Mayavi crashes with “Illegal hardware instruction” on MacOS 10.12

Mayavi crashes on my MacOS 10.12. Is there any suggestion?

I installed mayavi and vtk with

$ brew install vtk
$ pip install --user mayavi

and when I run mayavi2 or import mayavi.lab in python2.7, it crashes

$ mayavi2
[1]    93511 illegal hardware instruction  mayavi2

$ python2 -c "import mayavi.mlab"
[1]    93920 illegal hardware instruction  python2 -c "import mayavi.mlab"

Update

I find the problem may be in traitsui.api imported in mayavi.preferences.preference_manager .

$ python2 -c "import traitsui.api"
[1]    2421 illegal hardware instruction  python2 -c "import traitsui.api"

Update2

Going deeper, I find it's about "traits.api.Color"... used in traitsui.editors.code_editor

$ python -c "from traits.api.Color; print 'hi'; Color( 0xECE9D8 )"
hi
[1]    6414 illegal hardware instruction  python2 -c "from traits.api import Color; print 'hi'; Color(0xECE9D8)"

Thank to the suggestion from @PierredeBuyl.

I tried to reinstall pyqt and it works now!

The steps are:

$ brew install pyqt
Error: pyqt-4.11.3 already installed
To install this version, first `brew unlink pyqt`

$ brew unlink pyqt
Unlinking /usr/local/Cellar/pyqt/4.11.3... 78 symlinks removed

$ brew install pyqt
...

$ mayavi2    # now it works

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM