backgroundImage

Installing Great Expectations on a Mac M1

If you have the new Mac please read this before installing Great Expectations

Don Heppner
November 04, 2021
m-one-chip

I was excited to get going with Great Expectations on my M1 Mac, but it took me a while to work through some package dependencies that you need to compile yourself (most notably scipy and its numpy dependency). The following instructions worked for me™, if they work for you (or more importantly, if they don’t) please let us know in Slack.

These instructions come from looking through this StackOverflow post and this open GitHub issue; they cover how to install Great Expectations using pip.

Note: Be sure you are in a Python 3 virtual environment. In Linux or MacOS with Python3 installed, you can create a Python 3 virtual environment by:

python3 -m venv venv

source venv/bin/activate

Installing scipy

It is possible to install scipy using pip but you need to compile it yourself. This also applies to the numpy library dependency. To compile numpy, you require cython and pybind11

pip install cython pybind11

Then numpy can be compiled and installed (this takes a minute or two)

pip install --no-binary :all: --no-use-pep517 numpy

Once numpy is installed, you need to compile scipy itself, which depends on Fortran and BLAS/LACK. These packages can be installed with homebrew.

brew install openblas gfortran

Then you will have to tell the installer where it can find the OpenBLAS library (please note: your path to homebrew may vary, look at the output from the homebrew install for the correct path)

export OPENBLAS=/opt/homebrew/opt/openblas/lib/

Pythran is also needed for the scipy install to succeed

pip install pythran

Finally compile and install scipy (this can take a few minutes):

pip install --no-binary :all: --no-use-pep517 scipy

Now you can install Great Expectations using pip:

pip install great_expectations

Search our blog for the latest on data quality.


©2024 Great Expectations. All Rights Reserved.