在Linux下安装Python执行make命令时报错“Failed to build these modules: _ctypes“

异常

INFO: Could not locate ffi libs and/or headers

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd                
time                                                           


Failed to build these modules:
_ctypes                                                        

running build_scripts
creating build/scripts-3.7

原因

缺少c_types模块

解决

安装libffi-devel依赖包即可,执行yum install libffi-devel命令进行安装。
在这里插入图片描述再执行make命令即可成功编译了。

猜你喜欢

转载自blog.csdn.net/cnds123321/article/details/121622538