Filipe Ferminiano
Filipe Ferminiano

Reputation: 8791

unable to install bigfloat in osx, command 'clang' failed with exit status 1

I'm trying to install bigfloat in OSX Sierra with:

pip install bigfloat

But I'm receiving this error:

    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/

I already installed Xcode and ran:

xcode-select --install

How can I solve this?

Upvotes: 3

Views: 917

Answers (2)

Chris Gregg
Chris Gregg

Reputation: 2382

For anyone else with the issue, this worked for me:

brew install gmp mpfr
env "CFLAGS=-I/opt/homebrew/include -L/opt/homebrew/lib" pip install bigfloat

Upvotes: 0

jackar
jackar

Reputation: 724

It looks like you're missing GMP, if you use brew make sure to install both GMP and MPFR with brew install gmp mpfr, they're both prerequisites.

Upvotes: 3

Related Questions