问题现象描述
安装依赖时,使用pip3 install numpy命令安装时报错“Could not build wheels for numpy which use PEP 517 and cannot be install directly”,提示信息如下:

原因分析
centos等系统默认安装的gcc版本较低,导致numpy安装失败。
解决措施
执行如下命令安装:
export CFLAGS=-std=c99
pip3 install numpy==1.17.2
在CentOS系统中,由于默认gcc版本过低,尝试使用pip3安装numpy时可能会遇到CouldnotbuildwheelsfornumpywhichusePEP517andcannotbeinstalleddirectly的错误。为解决此问题,可以设置环境变量CFLAGS=-std=c99,并指定numpy版本(例如1.17.2)进行安装。
安装依赖时,使用pip3 install numpy命令安装时报错“Could not build wheels for numpy which use PEP 517 and cannot be install directly”,提示信息如下:

centos等系统默认安装的gcc版本较低,导致numpy安装失败。
执行如下命令安装:
export CFLAGS=-std=c99
pip3 install numpy==1.17.2
6174
2228
5392
3772
1308
402

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