gcc-pthread-fno-strict-aliasing-DNDEBUG-g-fwrapv-O2-Wall-Wstrict-prototypes-fPIC-DUSE__THREAD-DHAVE_SYNC_SYNCHRONIZE-I/usr/include/ffi-I/usr/include/libffi-I/usr/include/python2.7-cc/_cffi_backend.c-obuild/temp.linux-x86_64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17:fatalerror:ffi.h:Nosuchfileordirectory
compilationterminated.
原因:
缺少头文件和静态库包
解决方法:
sudoapt-getinstalllibffi-dev
错误二:
gcc-pthread-fno-strict-aliasing-DNDEBUG-g-fwrapv-O2-Wall-Wstrict-prototypes-fPIC-I/usr/include/python2.7-cbuild/temp.linux-x86_64-2.7/_openssl.c-obuild/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o-Wconversion-Wno-error=sign-conversion
build/temp.linux-x86_64-2.7/_openssl.c:28:20:fatalerror:Python.h:Nosuchfileordirectory
缺少Python的头文件和静态库包
sudoapt-getinstallpython-dev
补充知识:windows中pip安装库时出现cryptography报错解决方案
如果在安装程序中,系统提示有cryptography的报错,并提示有类似C:\Users\Administrator\AppData\Roaming\pip
这种路径提示信息,那么是你的pip源出现了问题。
首先,打开该路径文件。一般这种文件的类型是隐藏文件,在win10的页面工具栏中有相应的显示文件的选项,
而在win7中在工具——文件夹选项中。之后输入你的pip路径例如:C:\Users\Administrator\AppData\Roaming\pip