Skip to content

Instantly share code, notes, and snippets.

@anka
Last active August 2, 2022 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anka/f4a9a5f15e86c92ab39037ce5b09cd13 to your computer and use it in GitHub Desktop.
Save anka/f4a9a5f15e86c92ab39037ce5b09cd13 to your computer and use it in GitHub Desktop.
Workaround for running a Python Azure Function locally on an M1
# Install Python
brew install python@3.9
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# Update/check your source files (.zshrc, .bashrc, etc.)
export PATH="~/.nvm/current/bin:$PATH"
# Install specific Node version
nvm install 14.17.6
# Install gRPC package
pip3 install grpcio
# Install Azure Function Tools
npm install azure-functions-core-tools@4.0.4483
# Override cygrpc package
cp /opt/homebrew/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-darwin.so ~/.nvm/versions/node/v14.17.6/lib/node_modules/azure-functions-core-tools/bin/workers/python/3.9/OSX/X64/grpc/_cython/cygrpc.cpython-39-darwin.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment