mac上的pip install遇到版本错误

时间:2016-05-02 05:51:07

标签: python macos pip

我正在尝试使用pip安装python包,但它认为我有一个与实际不同的Mac版本:

pip install root_numpy

Collecting root-numpy
Using cached root_numpy-4.4.1.tar.gz
Building wheels for collected packages: root-numpy
Running setup.py bdist_wheel for root-numpy ... error
Complete output from command /Users/mattzhang/py3_kernel/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/38/2_qkncsd1hlgd2871lnmrgw80000gn/T/pip-build-xexox4xy/root-numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/38/2_qkncsd1hlgd2871lnmrgw80000gn/T/tmpawn1rjqlpip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.5
creating build/lib.macosx-10.6-intel-3.5/root_numpy
copying root_numpy/__init__.py -> build/lib.macosx-10.6-intel-3.5/root_numpy
copying root_numpy/_array.py -> build/lib.macosx-10.6-intel-3.5/root_numpy

...

clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)

这里的问题是我使用优胜美地版本10.10.5,但是pip认为我使用的是10.6。我该怎么做才能纠正这个问题?

1 个答案:

答案 0 :(得分:1)

尝试设置部署目标 export MACOSX_DEPLOYMENT_TARGET=10.10然后再次pip install root_numpy