1

I am trying to install pycurl on OS X Mavericks. I have downloaded and installed the Xcode dev tools to have some compiler. I went into the Xcode preferences and made sure that I have downloaded all the compliers I would need but still getting this error

When I try to install pycurl I get the following errors. Any help would be much appreciated.

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:~$
Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
Mysterio Man
  • 1,667
  • 1
  • 14
  • 17
  • Looks like you are not the only one having problems and they are not related to python: http://stackoverflow.com/questions/tagged/osx-mavericks – m.wasowski Mar 19 '14 at 22:18
  • The general (easiest) solution to all such problems is: Install Clang, Python and all related tools via [Homebrew](http://brew.sh/). The versions shipping with OS X are complicated, don’t rely on them. By exclusively relying on Homebrew you make your life vastly easier. – Konrad Rudolph Mar 19 '14 at 22:34
  • Ya tried to do homebrew on clang got the following error: local-mbp:~$ brew install clang Error: No available formula for clang Searching taps... local-mbp:~$ used sudo easy_install to install clang and that was successful. But still not able install pycurl – Mysterio Man Mar 19 '14 at 22:53
  • You shouldn't install `clang` with `easy_install`!!! That doesn't install `clang`, it installs Python bindings for `clang`. – daviewales Mar 20 '14 at 02:16
  • Also, you already have `clang`, as evident in your pasted output above. – daviewales Mar 20 '14 at 02:17
  • Possible duplicate of [Installing pycurl on mac](http://stackoverflow.com/questions/21521587/installing-pycurl-on-mac) – Vladimir May 10 '17 at 16:58

2 Answers2

3

Try this:

brew install python

Double check you are using brewed Python:

which python

(Should return something like /usr/local/bin/python)

Install pycurl with pip.

pip install pycurl

I just tested this on Mavericks.

daviewales
  • 2,144
  • 21
  • 30
  • Hi Daviewales., I tried what you have suggested. Python installed but the last step said that it wasnt able to link python to /usr/local/bin/python – Mysterio Man Mar 20 '14 at 17:05
  • Ran brew link python but said: Warning: Could not link python. Unlinking... Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local You can try again using `brew link python' Used brew link python and got an error: Error: Could not symlink file: /usr/local/Cellar/python/2.7.6/bin/pip2.7 Target /usr/local/bin/pip2.7 already exists. You may need to delete it. To force the link and overwrite all other conflicting files, do: brew link --overwrite formula_name – Mysterio Man Mar 20 '14 at 17:10
  • Tried to run pip install pycurl but getting the same error – Mysterio Man Mar 20 '14 at 17:10
  • I dont know if would disrupt any of my system python if I try to overwrite the python that is already there – Mysterio Man Mar 20 '14 at 17:40
  • You won't disrupt system Python. System Python doesn't live in `/usr/local`. It will be another Python that you've installed previously. (You should be able to delete it without issues.) – daviewales Mar 21 '14 at 11:41
3

Try specify the ARCHFLAGS env var:

ARCHFLAGS="-arch x86_64" pip install pycurl
Vladimir
  • 338
  • 7
  • 18