尝试安装python模块时出错代码一

时间:2016-04-11 22:19:37

标签: python github pip

命令pip后安装spotify-ripper

Command "/Users/ink/.pyenv/versions/2.7.10/bin/python2.7 -u -c "import     
setuptools,
tokenize;__file__='/private/var/folders/x4/6m1qwdmx7x9_qsbwv4zsny6w0000gn/T
/pip-build-oQ_7kB/cffi/setup.py';exec(compile(getattr(tokenize, 'open',      
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
install --record /var/folders/x4/6m1qwdmx7x9_qsbwv4zsny6w0000gn/T/pip-
3YzrfM-record/install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in     
/private/var/folders/x4/6m1qwdmx7x9_qsbwv4zsny6w0000gn/T/pip-build-
oQ_7kB/cffi/

这也很重要

c/_cffi_backend.c:15:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1

1 个答案:

答案 0 :(得分:0)

此处的问题是编译器无法找到libffi的包含文件。

您似乎正在使用OSX。如果xcode已正确安装,那么您应该在/usr/include/ffi包含文件。

如果是,请尝试:

CFLAGS=-I/usr/include/ffi pip install spotify-ripper

(如果您使用的是macportshomebrew,您可能会发现更容易安装libffi的版本

相关问题