一,报错信息
Building wheel for hnswlib (PEP 517) … error ERROR: Command errored
out with exit status 1: RuntimeError: Unsupported compiler – at least
C++11 support is needed! … … gcc: error trying to exec
‘cc1plus’: execvp: No such file or directory ERROR: Failed building
wheel for hnswlib gcc: error trying to exec ‘cc1plus’: execvp: No such
file or directory … … Failed to build **** ERROR: Could
not build wheels for **** which use PEP 517 and cannot be installed
directly
二,报错原因
缺少gcc和g++
三,解决方法
查看gcc和g++是否安装
gcc --version
g++ --version
未安装则安装gcc和g++
apt-get update
apt-get install gcc
apt-get install g++

文章描述了在尝试构建Python的hnswlib库时遇到的错误,错误表明系统缺乏C++11支持的编译器gcc和g++。解决方案是检查并确认gcc和g++是否已安装,如果未安装,则通过apt-get更新并安装这两个编译器。
1万+

被折叠的 条评论
为什么被折叠?



