在尝试在Mac上使用pip install安装cvxpy包时,我收到以下错误消息:
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from cvxpy/cvxcore/src/cvxcore.cpp:15:
cvxpy/cvxcore/src/cvxcore.hpp:18:10: fatal error: 'vector' file not found
#include <vector>
^~~~~~~~
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Mac正在运行OS Mojave。
pip install cvxpy
安装非常顺利。 - dheenapip install cvxpy
命令之前,使用CFLAGS=-stdlib=libc++
,例如CFLAGS=-stdlib=libc++ pip install cvxpy
,也可能有效。 - dheena