【问题标题】:pip install horovod fails on conda + OSX 10.14pip install horovod 在 conda + OSX 10.14 上失败
【发布时间】:2019-03-22 17:34:40
【问题描述】:

在安装了 pytorch 的 conda 环境中运行 pip install horovod 导致

error: None of TensorFlow, PyTorch, or MXNet plugins were built. See errors above.

标准输出顶部附近的根本问题在哪里

ld: library not found for -lstdc++ clang: error: linker command failed with exit code 1 (use -v to see invocation) INFO: Unable to build PyTorch plugin, will skip it.

【问题讨论】:

    标签: python pytorch horovod


    【解决方案1】:

    CFLAGS=-mmacosx-version-min=10.9 pip install horovod,灵感来自这个看似无关的Horovod issue

    This issue thread from pandas 有一个很好的解释:

    编译器标准库默认为 libstdc++ 或 libc++,具体取决于目标 macOS 版本 - libstdc++ 用于 10.8 及更低版本,libc++ 用于 10.9 及更高版本。这由环境变量 MACOSX_DEPLOYMENT_TARGET 或编译器选项-mmacosx-version-min 确定,否则默认为系统版本。

    当 distuils 在 macOS 上构建扩展时,它会将 MACOSX_DEPLOYMENT_TARGET 设置为编译 python 时使用的版本,即使主机系统/Xcode 较新。

    最近的 macOS 版本的 python 有一个为 10.9 (python.org) 构建的仅 64 位变体,以及一个为 10.6 (python.org) 或 10.7 (conda) 构建的通用 64/32 位变体。我正在运行 conda 通用变体,因此 distutils 以 macOS 10.7 为目标,尽管我的系统是 10.14,但 Xcode 10 没有安装 libstdc++。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-06
      • 1970-01-01
      • 2017-05-18
      • 2022-01-16
      • 2015-11-01
      • 2018-09-24
      • 1970-01-01
      • 2019-09-08
      相关资源
      最近更新 更多