【发布时间】:2015-03-15 02:09:18
【问题描述】:
我正在尝试安装 fatiando,一个用于 Python 的地球物理建模包。 我有一台装有 OS X v10.9.5 的 Mac。通过遵循package site 上建议的推荐安装,我获得了 Fiando 的所有依赖项(通过 Anaconda)。我已经安装了 Xcode。
我收到警告列表和最终错误消息:
fatiando/gravmag/_polyprism.c:349:10: fatal error: 'omp.h' file not found
#include "omp.h"
^
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "//anaconda/bin/python -c "import setuptools, tokenize;__file__='/var/folders/32/mwq0jhwd3dx7vjqmm8hkljp80000gn/T/pip-QFjo6d-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/32/mwq0jhwd3dx7vjqmm8hkljp80000gn/T/pip-CY4vyX-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/folders/32/mwq0jhwd3dx7vjqmm8hkljp80000gn/T/pip-QFjo6d-build
Macintosh-5:fatiando matteoniccoli$
可以在here 找到完整的终端输出(1100 多行)。
我已经联系了开发者,这似乎不是 Fiando 的问题。
有什么建议吗?
更新,3 月 15 日
当我第一次发布这个时,我没有 Xcode,然后我从 Apple 商店下载了最新的 Xcode。再次尝试,得到相同的消息。然后我看了this,从here下载了gcc,直接安装了。当我在终端上输入:gcc --version 时,我得到:i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
不过,在那之后,我仍然收到类似的消息。在另一个stackoverflow领导之后,我尝试从here安装setuptools
使用 curl https://bootstrap.pypa.io/ez_setup.py -o - | Python
现在,当我尝试安装 fatiando 时,我得到了一个不同的错误(在长输出的末尾):
fatiando/gravmag/_polyprism.c:349:10: fatal error: 'omp.h' file not found
#include "omp.h"
^
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "//anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/32/mwq0jhwd3dx7vjqmm8hkljp80000gn/T/pip-build-m1ieVO/fatiando/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/32/mwq0jhwd3dx7vjqmm8hkljp80000gn/T/pip-9wI6Z7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/32/mwq0jhwd3dx7vjqmm8hkljp80000gn/T/pip-build-m1ieVO/fatiando
论坛中有人通过电子邮件问我: Re Fiando,您是否安装了 Xcode 命令行工具?例如看到这个 http://railsapps.github.io/xcode-command-line-tools.html
但是当我尝试验证我是否按照那里的建议成功安装了 Xcode 命令行工具时,我得到了这个,所以我认为这不是问题:
-bash: /Library/Developer/CommandLineTools: is a directory
3 月 16 日更新 Leo Uieda 建议的尝试解决方案。
pip install --upgrade https://github.com/fatiando/fatiando/archive/kill-omp.zip 没有问题,但是
pip install --upgrade https://github.com/fatiando/fatiando/archive/master.zip 让我回到第 1 格:
...
...
fatiando/gravmag/_polyprism.c:349:10: fatal error: 'omp.h' file not found
#include "omp.h"
^
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Rolling back uninstall of fatiando
【问题讨论】:
-
请在问题中包含终端输出,而不是在外部页面上。
-
Ismail 非常长,1100 多行。我应该包括整个事情吗?我不确定什么是相关的,什么不是。