无法使用python3安装cffi

时间:2018-08-15 15:33:58

标签: python-3.x install python-cffi

我使用命令“ sudo python3 setup.py install”从源代码cffi安装 并得到此错误

running install
running bdist_egg
running egg_info
writing cffi.egg-info/PKG-INFO
writing dependency_links to cffi.egg-info/dependency_links.txt
writing entry points to cffi.egg-info/entry_points.txt
writing requirements to cffi.egg-info/requires.txt
writing top-level names to cffi.egg-info/top_level.txt
reading manifest file 'cffi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'cffi.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
running build_ext
building '_cffi_backend' extension
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protecto
r-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
-DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/python3.6m -c c/_cffi_backe
nd.c -o build/temp.linux-aarch64-3.6/c/_cffi_backend.o
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

1 个答案:

答案 0 :(得分:0)

该错误似乎表明python3头文件不可用。您可以尝试安装这些,然后重试。