To make mine more generic, try:
CFLAGS=-Ibrew --prefix gmp
/include LDFLAGS=-Lbrew --prefix gmp
/lib pip install ecdsa fastecdsa sympy
https://github.com/OpenZeppelin/nile/issues/22 This seems to be an issue with the Cairo programming language on apple's M1 computers. I read on the Cairo discord that you were able to solve it. Leaving a few success stories taken from the Cairo discord server for anybody stumbling upon this very problem:
CFLAGS=-Ibrew --prefix gmp/include LDFLAGS=-Lbrew --prefix gmp/lib pip install ecdsa fastecdsa sympy