出错内容:c/_cffi_backend.c:15:17: 致命错误:ffi.h:没有那个文件或目录

 解决方法:yum install -y libffi-devel

具体内容: ERROR: Command errored out with exit status 1:
   command: /root/anaconda3/envs/detection/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5or44j9i/cffi_251103a8e56849938a12dcf7ca90cbba/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5or44j9i/cffi_251103a8e56849938a12dcf7ca90cbba/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-3w9c0uqg
       cwd: /tmp/pip-install-5or44j9i/cffi_251103a8e56849938a12dcf7ca90cbba/
  Complete output (53 lines):
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/cffi
  copying cffi/verifier.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/api.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/__init__.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/lock.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/cparser.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/commontypes.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/model.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/recompiler.py -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.6/cffi
  copying cffi/_embedding.h -> build/lib.linux-x86_64-3.6/cffi
  running build_ext
  building '_cffi_backend' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/c
  gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/root/anaconda3/envs/detection/include/python3.6m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.6/c/_cffi_backend.o
  c/_cffi_backend.c:15:17: 致命错误:ffi.h:没有那个文件或目录
   #include <ffi.h>
                   ^
  编译中断。
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for cffi

Logo

更多推荐