【问题标题】:unable to install bigfloat in osx, command 'clang' failed with exit status 1无法在 osx 中安装 bigfloat,命令“clang”失败,退出状态为 1
【发布时间】:2017-11-28 05:48:28
【问题描述】:

我正在尝试在 OSX Sierra 中安装 bigfloat:

pip install bigfloat

但我收到此错误:

    mpfr.c:343:10: fatal error: 'gmp.h' file not found
    #include "gmp.h"
             ^
    1 error generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/hd/96gvrtvn66dcnbntwn9v3skh0000gp/T/pip-build-adS6t_/bigfloat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/hd/96gvrtvn66dcnbntwn9v3skh0000gp/T/pip-fwI1xE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/hd/96gvrtvn66dcnbntwn9v3skh0000gp/T/pip-build-adS6t_/bigfloat/

我已经安装了 Xcode 并运行了:

xcode-select --install

我该如何解决这个问题?

【问题讨论】:

    标签: python xcode macos


    【解决方案1】:

    您似乎缺少 GMP,如果您使用 brew,请确保使用 brew install gmp mpfr 安装 GMP 和 MPFR,它们都是先决条件。

    【讨论】:

      猜你喜欢
      • 2012-05-01
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      • 2014-09-03
      • 1970-01-01
      • 2018-11-29
      • 1970-01-01
      • 2018-12-22
      相关资源
      最近更新 更多