Pergunta

When I execute

sudo pip install pandas

I get the error:

creating build/temp.macosx-10.9-intel-2.7/pandas/src/datetime

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 -Ipandas/src/klib -Ipandas/src -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/index.c -o build/temp.macosx-10.9-intel-2.7/pandas/index.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

I have installed xcode and xcode command line tools.

In fact, I can confirm that cc is installed by executing:

cc -v

which returns:

Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
Foi útil?

Solução

These flags ended up letting me install it:

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

and then (of course):

sudo -E pip install pandas

Thanks @user3378649 for the flags suggestion - that got me thinking along the right track!

Outras dicas

Can you please these commands for more information.

As long as you didn't mention what you used to overcome this problem, I'd suggest different approaches to help narrow down in order to find the problem:

First Solution : Run these flags :

export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"

if it doesn't work run these flags :

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

Second Solution :

  • Get Homebrew - it's a one-line shell script to install!
  • Edit your .profile, or whatever is appropriate, and put /usr/local/bin at the start of -your PATH so that Homebrew binaries are found before system binaries
  • brew install python - this installs a newer version of python in /usr/local
  • run "pip install pandas"

Third Solution :

use easy_install.

Execute the following command in Terminal

PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:$(PATH)}"
export PATH

Then : $ sudo easy_install pandas

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top