我正在尝试在OS X Mavericks上安装pycurl。我已经下载并安装了Xcode dev工具以获得一些编译器。我进入Xcode首选项并确保我已经下载了我需要的所有编译器但仍然出现此错误
当我尝试安装pycurl时,我收到以下错误。任何帮助将非常感激。
local-mbp:~ $ sudo easy_install pycurl
Password:
Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Best match: pycurl 7.19.3.1
Downloading https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.3.1.tar.gz#md5=6df8fa7fe8b680d93248da1f8d4fcd12
Processing pycurl-7.19.3.1.tar.gz
Running pycurl-7.19.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jKMmtE/pycurl-7.19.3.1/egg-dist-tmp-9z89Ns
Using curl-config (libcurl 7.30.0)
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: Setup script exited with error: command 'cc' failed with exit status 1
local-mbp:~ $ which gcc
/usr/bin/gcc
local-mbp:~$ which cc
/usr/bin/cc
local-mbp:~$
答案 0 :(得分:3)
试试这个:
brew install python
仔细检查您是否正在使用brewed Python:
which python
(应返回类似/usr/local/bin/python
)
使用pycurl
安装pip
。
pip install pycurl
我刚在小牛队测试了这个。
答案 1 :(得分:3)
尝试指定ARCHFLAGS
env var:
ARCHFLAGS="-arch x86_64" pip install pycurl