【问题标题】:Grpcio fails installation for Tensorflow 2.5 on arm64 Apple SiliconGrpcio 在 arm64 Apple Silicon 上安装 Tensorflow 2.5 失败
【发布时间】:2021-09-12 12:46:02
【问题描述】:

我正在按照此处的说明进行操作:https://developer.apple.com/metal/tensorflow-plugin/ 并且在安装 grpcio 时遇到问题。当我尝试python -m pip install tensorflow-macos 时,我得到:

  AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_11_0_arm64')
  ----------------------------------------
  ERROR: Failed building wheel for grpcio

随后的尝试也以错误结束:

Running setup.py clean for grpcio
Failed to build grpcio
Installing collected packages: grpcio, tensorflow-estimator, keras-nightly, flatbuffers
  Attempting uninstall: grpcio
    Found existing installation: grpcio 1.38.1
    Uninstalling grpcio-1.38.1:
      Successfully uninstalled grpcio-1.38.1
    Running setup.py install for grpcio ... error

这里给出的解决方案:How can I install GRPCIO on an Apple M1 Silicon laptop? 很遗憾对我不起作用。

我对架构/芯片挑战非常缺乏经验,但它显示目前不支持 arm64?如果是这种情况,奇怪的是它包含在 tensorflow_plugin 步骤中。对我做错的任何想法将不胜感激。

【问题讨论】:

  • 添加GRPC_PYTHON_BUILD_SYSTEM_OPENSSLGRPC_PYTHON_BUILD_SYSTEM_ZLIB作为环境变量不起作用吗?
  • 很遗憾没有!我尝试了一些变体,但没有奏效。我最终使用 2.5 的社区解决方案解决了问题,所以会更新这篇文章。

标签: python tensorflow apple-m1 grpcio


【解决方案1】:

帮助我的是:

GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1  python -m pip install tensorflow-macos

【讨论】:

    猜你喜欢
    • 2022-01-06
    • 2021-06-12
    • 2021-09-11
    • 2021-04-12
    • 2021-04-03
    • 2022-07-01
    • 2022-07-29
    • 2021-05-15
    • 2021-06-20
    相关资源
    最近更新 更多