【问题标题】:Error code one when trying to install python module尝试安装python模块时出现错误代码一
【发布时间】:2016-04-11 22:19:36
【问题描述】:

在命令 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

【问题讨论】:

标签: python github pip


【解决方案1】:

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

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

如果是这样,请尝试:

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

(如果您使用的是macports 或homebrew,您可能会发现安装他们的libffi 版本更容易)

【讨论】:

  • 还是不行。什么是libffi?据我所知,xcode 已成功安装。编辑:刚刚从自制软件安装了 libffi,它可以工作,谢谢!
猜你喜欢
  • 2013-05-26
  • 1970-01-01
  • 2021-03-16
  • 1970-01-01
  • 1970-01-01
  • 2020-05-06
  • 1970-01-01
  • 2018-12-16
  • 2016-03-14
相关资源
最近更新 更多