Python 在mac OS X上安装大浮点

Python 在mac OS X上安装大浮点,python,macos,bigfloat,Python,Macos,Bigfloat,我试图在OSX上安装大浮动,但我遇到了多个问题。 我安装了amp,没有任何问题,但当我尝试安装mpfr时,出现以下错误: Warning: mpfr-3.1.5 already installed, it's just not linked. Collecting bigfloat Downloading bigfloat-0.3.0.tar.gz (216kB) 100% |████████████████████████████████| 225kB 1.6MB/s Installing

我试图在OSX上安装大浮动,但我遇到了多个问题。 我安装了amp,没有任何问题,但当我尝试安装mpfr时,出现以下错误:

Warning: mpfr-3.1.5 already installed, it's just not linked.
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/
这是什么意思?(我正在使用自制软件)

然后,很明显,如果我尝试安装bigfloat,它将不起作用,我会得到以下错误:

Warning: mpfr-3.1.5 already installed, it's just not linked.
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/
收集bigfloat
下载bigfloat-0.3.0.tar.gz(216kB)
100% |████████████████████████████████| 225kB 1.6MB/s
安装收集的包:bigfloat
正在为bigfloat运行setup.py安装。。。错误
从command/Users/name/anaconda2/bin/python-u-c“import setuptools,tokenize;uuu file uu='/private/tmp/pip build VCyOBn/bigfloat/setup.py';f=getattr(tokenize,'open',open)(uuu文件uuu);code=f.read().replace('\r\n','\n');f.close();exec(compile(code,'uu文件u,'exec'))”build_ext-I/usr/local/include-L/usr/local/lib安装--record/tmp/pip-K9AHsP-record/install-record.txt--外部管理的单一版本--编译:
运行build_ext
大厦“mpfr”扩建部分
创建构建
创建构建/临时macosx-10.7-x86_64-2.7
gcc-fno严格别名-I/Users/name/anaconda2/include-arch x86_64-DNDEBUG-g-fwrapv-O3-Wall-Wstrict原型-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
在/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include fixed/syslimits.h:7:0中包含的文件中,
来自/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,
摘自mpfr.c:16:
/usr/local/lib/gcc/x86_64-apple-darwin15.6.0/6.2.0/include fixed/limits.h:168:61:致命错误:limits.h:没有这样的文件或目录
#include_next/*递归到真实的*/
^
编译终止。
错误:命令“gcc”失败,退出状态为1
----------------------------------------
命令“/Users//anaconda2/bin/python-u-c”导入setuptools,标记化__文件_u='/private/tmp/pip build VCyOBn/bigfloat/setup.py';f=getattr(标记化“打开”,打开)(_文件);code=f.read().replace('\r\n','\n');f、 close();exec(compile(code,_ufile,_uu,'exec'))“build_ext-I/usr/local/include-L/usr/local/lib install--record/tmp/pip-K9AHsP-record/install-record.txt--外部管理的单一版本--compile”失败,错误代码为1,位于/private/tmp/pip build VCyOBn/bigfloat中/

必须安装
python-devel

在OS X中,尝试卸载并重新安装:

brew uninstall python
brew install python
另外,根据问题,
Osx GCC
(它只是clang的一个符号链接)不附带现成的
OpenMP
支持。您可以使用
OpenMP
安装
GCC

brew install gcc --without-multilib