关于python:pip-安装-grpcio-报错

74次阅读

共计 540 个字符,预计需要花费 2 分钟才能阅读完成。

问题形容:

平台: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    

参考文章:
grpcio fails to install on Apple Silicon #25082

正文完
 0