在小牛身上安装枕头/PIL

2024-04-28 05:36:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我在尝试使用pip/easy_install安装枕头时遇到一个奇怪的错误:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.5.3/include/freetype2 -I/private/var/folders/c_/r7sp373509jdb6_1xmmzvl9c0000gn/T/pip_build_tills13/Pillow/libImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

我已经阅读了所有的符号链接答案,我已经安装了命令行工具,似乎没有任何工作。我总是犯那个错误。


Tags: pipincludeusr错误libraryframeworkerrorversions
3条回答

我用下面的方法解决了那个问题。普罗巴利与今天的小牛命令行工具更新有关。在执行pip安装之前,请尝试将以下内容添加到终端:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

除了@jussi,我还必须打开终端并执行以下操作:

    sudo bash
    export CFLAGS=-Qunused-arguments
    export CPPFLAGS=-Qunused-arguments

只有这样才能正确地运行“pip install should”

如果不使用超级用户提示运行此操作,将出现以下错误:

    error: could not create '/Library/Python/2.7/site-packages/PIL': Permission denied

我运行OSX 10.9.2,安装了2014年3月的命令行工具。如果有什么不同的话,我还安装了自制程序。

在终端中运行此命令:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pillow


更多信息:

Xcode5.1附带的编译器将未知的传递参数视为错误。

我们要它忽略那些“错误”

来源:http://bruteforce.gr/bypassing-clang-error-unknown-argument.html

相关问题 更多 >