在Mac 10.14上安装带有pip的python igraph失败,原因是;找不到-lstdc++&引用;

在Mac 10.14上安装带有pip的python igraph失败,原因是;找不到-lstdc++&引用;,python,python-3.x,igraph,Python,Python 3.x,Igraph,我试图在Mac OS X 10.14上使用pip3安装python igraph,但安装失败,并显示以下错误消息: $ pip3 install python-igraph ...snip... gcc -bundle -undefined dynamic_lookup -L/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib -arch x86_64 -L/Users/charles/.pyenv/versions/miniconda3-

我试图在Mac OS X 10.14上使用
pip3
安装
python igraph
,但安装失败,并显示以下错误消息:

$ pip3 install python-igraph

...snip...

gcc -bundle -undefined dynamic_lookup -L/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib -arch x86_64 -L/Users/charles/.pyenv/versions/miniconda3-4.3.30/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/src/edgeobject.o build/temp.macosx-10.7-x86_64-3.6/src/common.o build/temp.macosx-10.7-x86_64-3.6/src/py2compat.o build/temp.macosx-10.7-x86_64-3.6/src/graphobject.o build/temp.macosx-10.7-x86_64-3.6/src/indexing.o build/temp.macosx-10.7-x86_64-3.6/src/igraphmodule.o build/temp.macosx-10.7-x86_64-3.6/src/bfsiter.o build/temp.macosx-10.7-x86_64-3.6/src/convert.o build/temp.macosx-10.7-x86_64-3.6/src/vertexobject.o build/temp.macosx-10.7-x86_64-3.6/src/random.o build/temp.macosx-10.7-x86_64-3.6/src/edgeseqobject.o build/temp.macosx-10.7-x86_64-3.6/src/error.o build/temp.macosx-10.7-x86_64-3.6/src/vertexseqobject.o build/temp.macosx-10.7-x86_64-3.6/src/arpackobject.o build/temp.macosx-10.7-x86_64-3.6/src/attributes.o build/temp.macosx-10.7-x86_64-3.6/src/filehandle.o build/temp.macosx-10.7-x86_64-3.6/src/pyhelpers.o igraphcore/lib/libigraph.a -Ligraphcore/lib -L/usr/local/lib -L/usr/lib -lxml2 -lz -lm -lstdc++ -o build/lib.macosx-10.7-x86_64-3.6/igraph/_igraph.cpython-36m-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 'gcc' failed with exit status 1

gcc版本:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
python版本:

$ python3 --version
Python 3.6.7
(旁注,
python
python3
指向相同的python,
pip
pip3
指向相同的(对应的)pip。)

我还尝试运行了
xcode-select--install
,但这告诉我“命令行工具已经安装,请使用“软件更新”来安装更新”(xcode是最新的)。

Run

export MACOSX_DEPLOYMENT_TARGET=10.9
在运行
pip之前,安装pythonigraph
。然后您会看到它安装成功:

$ pip install python-igraph
Collecting python-igraph
  Using cached https://files.pythonhosted.org/packages/0f/a0/4e7134f803737aa6eebb4e5250565ace0e2599659e22be7f7eba520ff017/python-igraph-0.7.1.post6.tar.gz
Building wheels for collected packages: python-igraph
  Running setup.py bdist_wheel for python-igraph ... done
  Stored in directory: /Users/charles/Library/Caches/pip/wheels/41/d6/02/34eebae97e25f5b87d60f4c0687e00523e3f244fa41bc3f4a7
Successfully built python-igraph
Installing collected packages: python-igraph
Successfully installed python-igraph-0.7.1.post6

在运行
pip之前,安装pythonigraph
。然后您会看到它安装成功:

$ pip install python-igraph
Collecting python-igraph
  Using cached https://files.pythonhosted.org/packages/0f/a0/4e7134f803737aa6eebb4e5250565ace0e2599659e22be7f7eba520ff017/python-igraph-0.7.1.post6.tar.gz
Building wheels for collected packages: python-igraph
  Running setup.py bdist_wheel for python-igraph ... done
  Stored in directory: /Users/charles/Library/Caches/pip/wheels/41/d6/02/34eebae97e25f5b87d60f4c0687e00523e3f244fa41bc3f4a7
Successfully built python-igraph
Installing collected packages: python-igraph
Successfully installed python-igraph-0.7.1.post6