我正在尝试在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
我该如何解决这个问题?
答案 0 :(得分:3)
看起来您错过了GMP,如果您使用brew,请确保使用brew install gmp mpfr
同时安装GMP和MPFR,它们都是先决条件。