在Mac上安装imposm(Python包)

时间:2014-01-22 09:12:32

标签: python macos gcc

以下是我执行sudo pip install imposm

时出现的错误
    #include "tcutil.h"

             ^

    1 error generated.

    error: command 'gcc' failed with exit status 1

我相信我已经在我的Mac上的gcc下安装了/usr/bin/gcc(版本:4.2.1)(OSX 10.8.5)。我不知道还有什么需要做的。其他详情。

    gcc --version
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
    Target: x86_64-apple-darwin12.5.0
    Thread model: posix

编辑:我的Mac上已经列出了要求(C / C ++编译器,Python库和Google Protobuf)。这就是错误让我困惑的原因。

2 个答案:

答案 0 :(得分:4)

您需要安装tokyo-cabinet,其中imposm用于缓存。

如果您使用homebrew,则只需:brew install tokyo-cabinet

答案 1 :(得分:0)

该模块的文档说明如下:

  

PBF解析器是作为C扩展编写的,你需要有一个   C / C ++编译器,Python库和Google Protobuf。

至少,如果这是该模块的适当文档(http://imposm.org/docs/imposm.parser/latest/install.html#installation

我无法真正研究如何在Mac上安装这些组件,但如果您没有满足这些要求,那可能就是它无法正常工作的原因。

相关问题