栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

在linux下安装python模块出现错误

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

在linux下安装python模块出现错误

出错内容: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('"'"'rn'"'"', '"'"'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
                   ^
  编译中断。
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for cffi

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/589003.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号