【问题标题】:Unable to install python-geohash using PIP in mac terminal无法在 mac 终端中使用 PIP 安装 python-geohash
【发布时间】:2019-06-06 20:13:31
【问题描述】:

安装 python-geocode 并不容易。我在我的 mac (10.14.4) 上运行 Anaconda,在终端中,我正在使用:

pip install python-geohash

我收到以下错误:

    warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  1 warning generated.
  g++ -bundle -undefined dynamic_lookup -L/anaconda3/lib -arch x86_64 -L/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/src/geohash.o -o build/lib.macosx-10.7-x86_64-3.7/_geohash.cpython-37m-darwin.so
  clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
  ld: library not found for -lstdc++
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command 'g++' failed with exit status 1

  ----------------------------------------
  Failed building wheel for python-geohash
  Running setup.py clean for python-geohash
Failed to build python-geohash

这让我觉得我需要运行 python-geohash 的一些库要么已过期,要么尚未安装。谁能具体告诉我这里的问题是什么?

【问题讨论】:

  • 你安装了Command Line Tools 吗?
  • 我不确定 - 我该如何检查?
  • 出现了,当我使用: xcode-select --install 时,我得到:命令行工具已经安装,使用“软件更新”来安装更新
  • 我正在安装 Xcode_10.2 。我不知道这是否能解决问题。

标签: python pip anaconda geohashing


【解决方案1】:

我知道这是一个非常古老的问题。但是,如果有人遇到类似的问题(我刚刚遇到过),我在这里找到了解决方案:

https://aichamp.wordpress.com/2019/11/06/error-with-python-geohash-installation-while-installing-superset-in-osx-catalina/

所以基本上运行以下命令(对于 macOS):

sudo CFLAGS=-stdlib=libc++ pip3 install python-geohash

【讨论】:

    猜你喜欢
    • 2018-01-23
    • 2020-01-10
    • 2019-09-18
    • 2016-03-04
    • 2019-10-02
    • 1970-01-01
    • 2021-08-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多