Search code examples
pythonpipscipyapple-m1vaticle-typedb

Issues installing typedb-cti dependency scipy on macOS with M1 chip


While following the instructions to install typedb-cti:

cd <path/to/typedb-data-cti>/
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

I got the following errors:

Collecting scipy>=1.8
  Using cached scipy-1.9.1.tar.gz (42.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
...
...
...
Library npymath found: YES
      Library npyrandom found: YES
      Did not find CMake 'cmake'
      Found CMake: NO
      Run-time dependency openblas found: NO (tried pkgconfig, framework and cmake)
      Run-time dependency openblas found: NO (tried framework)
      
      ../../scipy/meson.build:130:0: ERROR: Pkg-config binary for machine 1 not found. Giving up.

Solution

  • What worked for me was (after activating the venv) to first install the latest nightly build from scipy like so:

    pip install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy

    and then run:

    pip install -r requirements.txt