The python firebase admin SDK isn't installing on Apple Silicon/M1. I've tried fixes in other posts here and on Github and they haven't worked. It's unclear to me if they work for anyone.
The command pip install firebase-admin
fails when it tries the setup script for the grpico package, which is a dependency of firebase.
I've tried the install with python 3.8.2, 3.9.4, and 3.9.5. All the versions failed. I've tried it inside a venv and globally, both failed.
My understanding of what's going on so far is:
pip install firebase-admin
will try to install grpico (version 1.38.0)clang
commands, attempting to compile a version for arm.ERROR: Command errored out with exit status 1: /Users/brown/Developer/parse-tools/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] ...
If someone has a working fix, please explain how it works. I'm not a huge fan of pasting random commands into the terminal without understanding what they do.
After reading every crazy guide on how to install grpcio, I was able to get it working with only two steps.
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
What do these ENV vars do? Who knows. No one has bothered to explain or communicate around this issue at all. Classic.
pip3 install firebase-admin
. This worked for me.