OSX使用qpsolver的時候報錯
File "quadprog/quadprog.pyx", line 91, in quadprog.solve_qp
反覆pip install/uninstall後確定問題出現在qpsolvers包
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
使用pip install qpsolvers
會報以上錯誤。原因是OS X(我使用的10.15.7)下lib的問題。
使用一下命令即可
sudo CFLAGS=-stdlib=libc++ pip install qpsolvers