【问题标题】:Can't install tensorflow-io on m1无法在 m1 上安装 tensorflow-io
【发布时间】:2021-12-08 15:41:40
【问题描述】:

我无法在环境下的 m1 mac 上安装 tensorflow-io。虽然我成功安装了 tensorflow-macos 和其他库,但是在 tensorflow_io 中出现错误

“错误:找不到满足tensorflow-io要求的版本(来自版本:无)

错误:没有找到 tensorflow-io 的匹配分布”

机器:M1 Mac

操作系统:MacOS Monterey 12.0.1

环境:迷你锻造

Python:3.9

张量流版本:2.5.0

【问题讨论】:

    标签: python tensorflow apple-m1


    【解决方案1】:

    您可以使用 wheel 文件安装 tensorflow-io。

    首先,克隆 tensorflow/io 存储库并构建它,如下所示。

    $ python3 setup.py -q bdist_wheel
    

    wheel 文件将在 dist 目录中创建。 然后,您可以通过执行以下操作来安装轮子。

    $ python3 -m pip install --no-deps <wheel-file-build-from-last-step>
    

    供大家参考,在我的环境下运行的结果如下。

    $ git clone https://github.com/tensorflow/io.git
    $ cd io
    $ python3 setup.py -q bdist_wheel
    Project: tensorflow-io
    Exclude: ['tests', 'tests.*', 'tensorflow_io_gcs_filesystem', 
    'tensorflow_io_gcs_filesystem.*']
    Install Requires: ['tensorflow-io-gcs-filesystem==0.24.0']
    Project Rootpath: tensorflow_io
    $ python3 -m pip install --no-deps dist/tensorflow_io-0.24.0-cp39-cp39-macosx_11_0_arm64.whl
    Processing ./dist/tensorflow_io-0.24.0-cp39-cp39-macosx_11_0_arm64.whl
    Installing collected packages: tensorflow-io
    Successfully installed tensorflow-io-0.24.0
    

    参考网址:arm64 support for M1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-17
      • 2021-04-22
      • 2022-06-11
      • 2021-10-10
      • 2023-03-12
      • 1970-01-01
      • 2022-11-11
      • 2021-07-25
      相关资源
      最近更新 更多