问题描述:
平台:ARM macbook
pip 安装 grpcio 报错
raise CompileError(msg)
distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1
[end of output]
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> grpcio
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
解决办法:
加四对环境变量
CFLAGS="-I/opt/homebrew/opt/openssl/include" LDFLAGS="-L/opt/homebrew/opt/openssl/lib" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip install grpcio==1.37
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。