在OSX上安装pip cffi软件包失败

布希亚

我正在安装用于加密和Jasmin安装的cffi软件包。

我在发布问题之前做了一些研究,所以我发现了以下选择,但似乎不起作用:

系统

Mac OSx 10.9.5

python2.7

错误

c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found

#include <ffi.h>

         ^

1 warning and 1 error generated.

请在以下问题上指导我。

谢谢

命令

env DYLD_LIBRARY_PATH = / usr / local / opt / openssl / lib / ARCHFLAGS =“-Wno-error = unused-command-line-argument-hard-error-in-future” LDFLAGS =“-L / usr / local / opt / openssl / lib“ CFLAGS =”-I / usr / local / opt / openssl / include“ sudo -E pip install cffi

日志

bhushanvaiude$ env DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib/ ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" sudo -E pip install cffi
Password:
Downloading/unpacking cffi
  Downloading cffi-0.8.6.tar.gz (196kB): 196kB downloaded
  Running setup.py egg_info for package cffi
    warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
    1 warning generated.
    
Downloading/unpacking pycparser (from cffi)
  Downloading pycparser-2.10.tar.gz (206kB): 206kB downloaded
  Running setup.py egg_info for package pycparser
    
Installing collected packages: cffi, pycparser
  Running setup.py install for cffi
    warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
    1 warning generated.
    building '_cffi_backend' extension
    cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Qunused-arguments -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -DUSE__THREAD -I@@HOMEBREW_CELLAR@@/libffi/3.0.13/lib/libffi-3.0.13/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.9-intel-2.7/c/_cffi_backend.o
    warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
    c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
    #include <ffi.h>
             ^
    1 warning and 1 error generated.
    error: command 'cc' failed with exit status 1
    Complete output from command /Users/****project path***/bin/python -c "import setuptools;__file__='/Users/****project path***/build/cffi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/7w/8z_mn3g120n34bv0w780gnd00000gn/T/pip-e6d6Ay-record/install-record.txt --single-version-externally-managed --install-headers /Users/****project path***/include/site/python2.7:
    warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]

1 warning generated.

running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/__init__.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/api.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/backend_ctypes.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/commontypes.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/cparser.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/ffiplatform.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/gc_weakref.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/lock.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/model.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/vengine_cpy.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/vengine_gen.py -> build/lib.macosx-10.9-intel-2.7/cffi

copying cffi/verifier.py -> build/lib.macosx-10.9-intel-2.7/cffi

running build_ext

building '_cffi_backend' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/c

cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/usr/local/opt/openssl/include -Qunused-arguments -pipe -Wno-error=unused-command-line-argument-hard-error-in-future -DUSE__THREAD -I@@HOMEBREW_CELLAR@@/libffi/3.0.13/lib/libffi-3.0.13/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.9-intel-2.7/c/_cffi_backend.o

warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]

c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found

#include <ffi.h>

         ^

1 warning and 1 error generated.

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Yariv Katz

在您的终端中尝试运行:

xcode-select --install

之后,尝试再次安装软件包。

默认情况下,XCode会自己安装为IDE,并且不会设置供命令行工具使用的环境。例如,该/usr/include文件夹将丢失。

运行上面的命令将安装从命令行运行编译并创建所需的符号链接所必需的工具。由于Python软件包使用XCode的命令行界面来编译本地代码部分,因此需要执行此步骤来安装包含本地组件的Python软件包。

每个XCode安装/升级只需要执行一次,或者看到类似的错误。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

安装软件包失败

来自分类Dev

NuGet安装软件包失败

来自分类Dev

Nuget软件包安装失败

来自分类Dev

Orchard 1.8软件包安装失败

来自分类Dev

安装软件包Webr失败

来自分类Dev

R:安装RMySQL软件包失败

来自分类Dev

软件包:“ xorgxrdp”安装失败![Webmin]

来自分类Dev

xgboost R软件包安装失败

来自分类Dev

Jenkins 1.609本机软件包安装程序在OSX Yosemite上失败

来自分类Dev

在Ubuntu 14.04上Softether Deb软件包安装失败

来自分类Dev

由于软件包损坏,Maven在ubuntu上安装失败

来自分类Dev

安装软件包失败失败apt-get

来自分类Dev

安装软件包失败失败apt-get

来自分类Dev

R软件包:RCurl和curl软件包在Linux上安装失败

来自分类Dev

如何在OSX上安装NuGet软件包?

来自分类Dev

安装软件包失败:安装软件包龙卷风时发生错误

来自分类Dev

百胜安装软件包,而没有更新其他软件包或失败...?

来自分类Dev

尝试从GitHub安装时,软件包安装失败

来自分类Dev

尝试从GitHub安装时,软件包安装失败

来自分类Dev

节点js npm软件包OSX失败

来自分类Dev

错误:在高山docker映像上安装pip软件包时,命令'gcc'失败,退出状态为1

来自分类Dev

安装软件包Microsoft.Owin.Host.SystemWeb失败

来自分类Dev

ember-cli软件包安装失败

来自分类Dev

允许python软件包要求安装失败

来自分类Dev

R-尝试安装软件包时:InternetOpenUrl失败

来自分类Dev

OTRS .opm软件包安装失败并显示错误?

来自分类Dev

Docker中的PECL软件包安装失败

来自分类Dev

ember-cli软件包安装失败

来自分类Dev

Umbraco自定义软件包安装失败