Installing API on M1 mac

Looking to install api using pip install mp_api but keep running into an error during install using terminal on an M1. Has anyone seen these errors?

Sample below of where it seems to fail:

  [76/1619] Generating 'scipy/_lib/_test_deprecation_def.cpython-310-darwin.so.p/_test_deprecation_def.c'.
  [77/1619] Generating 'scipy/_lib/_test_deprecation_call.cpython-310-darwin.so.p/_test_deprecation_call.c'.
  [78/1619] Generating 'scipy/_lib/_ccallback_c.cpython-310-darwin.so.p/_ccallback_c.c'.
  [79/1619] Generating 'scipy/_lib/messagestream.cpython-310-darwin.so.p/messagestream.c'.
  ninja: build stopped: subcommand failed.

INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /private/var/folders/kf/h2z67f9n2y34sg31vwv7qsx80000gn/T/pip-build-env-kunn807g/normal/bin/ninja
+ meson setup --prefix=/Users/liammorrissey/miniconda3 /private/var/folders/kf/h2z67f9n2y34sg31vwv7qsx80000gn/T/pip-install-td0oimyb/scipy_431075fec8294748a9bc8deec49aa5b1 /private/var/folders/kf/h2z67f9n2y34sg31vwv7qsx80000gn/T/pip-install-td0oimyb/scipy_431075fec8294748a9bc8deec49aa5b1/.mesonpy-zh2pl0ar/build --native-file=/private/var/folders/kf/h2z67f9n2y34sg31vwv7qsx80000gn/T/pip-install-td0oimyb/scipy_431075fec8294748a9bc8deec49aa5b1/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
+ meson compile
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

It looks like you’re trying to pip install scipy within a conda environment (through requirements of mp-api). Could you try installing scipy through conda first, and then pip install mp-api?

Thanks for the response, I installed scipy successfully and it appears the mp-api installed. Once installed however I now run into an error where it can’t read it. I feel like I am close!

Successfully installed PyYAML-6.0 contourpy-1.0.7 cycler-0.11.0 emmet-core-0.54.5 fonttools-4.39.4 future-0.18.3 kiwisolver-1.4.4 latexcodec-2.0.1 matplotlib-3.7.1 monty-2023.5.8 mp-api-0.33.1 mpmath-1.3.0 msgpack-1.0.5 networkx-3.1 palettable-3.3.3 pandas-2.0.1 pillow-9.5.0 plotly-5.14.1 pybtex-0.24.0 pydantic-1.10.7 pymatgen-2023.5.10 pyparsing-3.0.9 python-dateutil-2.8.2 pytz-2023.3 spglib-2.0.2 sympy-1.12 tabulate-0.9.0 tenacity-8.2.2 typing-extensions-4.5.0 tzdata-2023.3 uncertainties-3.1.7

(base) liammorrissey@Liams-MacBook-Air api % from mp_api.client import MPRester

from: can’t read /var/mail/mp_api.client

Great! Make sure to work in a python session and not in your shell.