Skip to content

Instantly share code, notes, and snippets.

@walkoncross
Last active July 25, 2023 14:05
Show Gist options
  • Save walkoncross/2594b14c19359ecdc80b8fe74a0de89f to your computer and use it in GitHub Desktop.
Save walkoncross/2594b14c19359ecdc80b8fe74a0de89f to your computer and use it in GitHub Desktop.
How to install mayavi on MacBook Pro M1

Install mayavi on MacBook Pro M1

by: https://github.com/walkoncross (zhaoyafei0210@gmail.com)

Install vtk

pip3 install vtk==9.0.2

Install PyQt5

pip install PyQt5

If pip install failed (which did on my Mac), install from Homebrew:

brew install PyQt5

and make symbol link:

ln -s /opt/homebrew/Cellar/pyqt@5/5.15.4_2/lib/python3.9/site-packages/PyQt /Users/zhaoyafei/miniforge3/lib/python3.9/site-packages

Replace "/Users/zhaoyafei/miniforge3/lib/python3.9/site-packages" with your python lib path.

Install mayavi from source

git clone https://github.com/enthought/mayavi.git
cd mayavi
python setup.py install
@iamsavva
Copy link

my two cents:

  • thanks you walkoncross for the above
  • the above failed for me at the last step with error: unknown target CPU 'apple-m1'
  • there is another (possibly useful) installation procedure here, haven't tried it though
  • for anyone struggling -- consider using plotly instead, it's a one-line install that bloody works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment