2017-05-04 53 views
0

我想在OS X上安裝大浮點數,但遇到多個問題。 我已經安裝了放大器沒有任何問題,但是當我試圖安裝MPFR我得到這個錯誤:在Mac OS X上安裝大浮點數

Warning: mpfr-3.1.5 already installed, it's just not linked. 

這是什麼意思? (我正在使用Homebrew)。

然後,很顯然,如果我嘗試安裝bigfloat它不工作,我得到這個錯誤:

Collecting bigfloat 
Downloading bigfloat-0.3.0.tar.gz (216kB) 
100% |████████████████████████████████| 225kB 1.6MB/s 
Installing collected packages: bigfloat 
Running setup.py install for bigfloat ... error 
Complete output from command /Users/name/anaconda2/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-VCyOBn/bigfloat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext -I/usr/local/include -L/usr/local/lib install --record /tmp/pip-K9AHsP-record/install-record.txt --single-version-externally-managed --compile: 
running build_ext 
building 'mpfr' extension 
creating build 
creating build/temp.macosx-10.7-x86_64-2.7 
gcc -fno-strict-aliasing -I/Users/name/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/Users/name/anaconda2/include/python2.7 -c mpfr.c -o build/temp.macosx-10.7-x86_64-2.7/mpfr.o 
In file included from /usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed/syslimits.h:7:0, 
       from /usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed/limits.h:34, 
       from /Users/name/anaconda2/include/python2.7/Python.h:19, 
       from mpfr.c:16: 
/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory 
#include_next <limits.h> /* recurse down to the real one */ 
                  ^
compilation terminated. 
error: command 'gcc' failed with exit status 1 

---------------------------------------- 
Command "/Users//anaconda2/bin/python -u -c "import setuptools,  tokenize;__file__='/private/tmp/pip-build-VCyOBn/bigfloat/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext -I/usr/local/include -L/usr/local/lib install --record /tmp/pip-K9AHsP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-VCyOBn/bigfloat/ 

回答

0

您必須安裝python-devel

在OS X嘗試卸載並重新安裝:

brew uninstall python 
brew install python 

此外,根據this問題,Osx GCC(這僅僅是鏗鏘一個符號連接)不OpenMP蘇出貨開箱即用。您可以安裝GCCOpenMP

brew install gcc --without-multilib