gpt4 book ai didi

python - 如何在 Mac 操作系统上安装 Quadprog

转载 作者:太空宇宙 更新时间:2023-11-03 19:52:53 26 4
gpt4 key购买 nike

我在 Python 3.6 下的 macOS 上安装 quadprog 时遇到一些困难。我尝试了多种解决方案,但似乎没有任何效果。

我需要安装的是trajectory_planning_helpers并且它需要quadprog。这是我输入命令 pip3 installquadprog 时遇到的错误:

3 warnings generated.
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/aind.c -o build/temp.macosx-10.6-intel-3.6/quadprog/aind.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/solve.QP.c -o build/temp.macosx-10.6-intel-3.6/quadprog/solve.QP.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/util.c -o build/temp.macosx-10.6-intel-3.6/quadprog/util.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/dpofa.c -o build/temp.macosx-10.6-intel-3.6/quadprog/dpofa.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/daxpy.c -o build/temp.macosx-10.6-intel-3.6/quadprog/daxpy.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/ddot.c -o build/temp.macosx-10.6-intel-3.6/quadprog/ddot.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/dscal.c -o build/temp.macosx-10.6-intel-3.6/quadprog/dscal.o
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Iquadprog -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c quadprog/f2c_lite.c -o build/temp.macosx-10.6-intel-3.6/quadprog/f2c_lite.o
creating build/lib.macosx-10.6-intel-3.6
/usr/bin/clang++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-3.6/quadprog/quadprog.o build/temp.macosx-10.6-intel-3.6/quadprog/aind.o build/temp.macosx-10.6-intel-3.6/quadprog/solve.QP.o build/temp.macosx-10.6-intel-3.6/quadprog/util.o build/temp.macosx-10.6-intel-3.6/quadprog/dpofa.o build/temp.macosx-10.6-intel-3.6/quadprog/daxpy.o build/temp.macosx-10.6-intel-3.6/quadprog/ddot.o build/temp.macosx-10.6-intel-3.6/quadprog/dscal.o build/temp.macosx-10.6-intel-3.6/quadprog/f2c_lite.o -o build/lib.macosx-10.6-intel-3.6/quadprog.cpython-36m-darwin.so
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
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 '/usr/bin/clang++' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/r3/42nmx6bs2gbgxj3gm1hcl6_00000gn/T/pip-install-fvpe_m9v/quadprog/setup.py'"'"'; __file__='"'"'/private/var/folders/r3/42nmx6bs2gbgxj3gm1hcl6_00000gn/T/pip-install-fvpe_m9v/quadprog/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/r3/42nmx6bs2gbgxj3gm1hcl6_00000gn/T/pip-record-0k3qjcbz/install-record.txt --single-version-externally-managed --compile Check the logs for full command output

最佳答案

我在我的 MacBook 上尝试使用 Python 3.7,它安装正确。

根据您提供的错误消息,我怀疑问题可能出在Python版本(3.6)或lstdc++版本(10.6)

您可以尝试将Python升级到3.7版本,然后安装quadprog吗?

这是适用于 Python 3.7 的安装

$ pip3 install quadprog

收集quadprog 正在下载https://files.pythonhosted.org/packages/.../quadprog-0.1.7.tar.gz

收集 Cython(来自quadprog) 正在下载https://files.pythonhosted.org/packages/.../Cython-0.29.14-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.9MB)

...

安装收集的包:Cython、quadprog

正在为quadprog运行setup.py安装...完成

成功安装Cython-0.29.14quadprog-0.1.7

关于python - 如何在 Mac 操作系统上安装 Quadprog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59718137/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com