【问题标题】:Unable to install tfcoreml (specifically coremltools)无法安装 tfcoreml(特别是 coremltools)
【发布时间】:2019-08-11 21:02:25
【问题描述】:

我尝试了一个 virtualenv,将我的 python 类型更改为 2.7x,然后手动安装它。

但是,我不断收到

的错误

Could not find a version that satisfies the requirement coremltools>=0.8 (from tfcoreml) (from versions: ) No matching distribution found for coremltools>=0.8 (from tfcoreml)

当我使用 pip search coremltools 搜索版本时,我只能得到 coremltools (2.1.0) - Community Tools for CoreML,但它仍然不会让我得到那个版本。

我需要帮助。有人可以告诉我我做错了什么或逐步指导我如何正确安装它吗?

谢谢。

【问题讨论】:

    标签: tensorflow machine-learning-model


    【解决方案1】:

    刚刚解决了同样的错误,其中 coremltools==0.8 显示为 turicreate 的依赖项。

    问题在于,对于 coremltools >= 6.2,versions pip can see 是预先构建的,并且仅适用于 Mac OSX >= 10.12 和 Linux。

    (我运行的是 Mac OSX 10.11,我怀疑这个错误是 Apple 试图鼓励升级的方式。)

    通过从https://github.com/apple/coremltools/releases 下载适当的版本并遵循其自述文件,我能够从源代码构建和安装 coremltools。

    这意味着:

    • 手动安装依赖:

      pip install numpy>=1.10
      pip install protobuf>=3.1
      
    • 我没有命令cmake,所以我从https://cmake.org下载了它。在 GUI 内有将其符号链接安装到 /usr/local/bin 的说明:

      sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
      
    • 从 coremltools 源目录,运行:

      cmake . -DPYTHON=$(which python) -DPYTHON_CONFIG=$(which python-config)
      make
      

      python setup.up install
      

    然后 Pip 可以看到 coremltools 并继续安装 turicreate。

    【讨论】:

      【解决方案2】:

      我对“coremltools”也有同样的问题。问题是 python 版本。

      我可以在 3.6 环境下成功安装。

      python 3.7+没有轮子

      (感谢“|fried|”的链接...)

      【讨论】:

        猜你喜欢
        • 2018-04-09
        • 1970-01-01
        • 2021-09-03
        • 1970-01-01
        • 2018-04-10
        • 2015-02-08
        • 2011-08-10
        • 2015-01-06
        • 2020-12-12
        相关资源
        最近更新 更多