Fix "error: command 'clang' failed with exit status 1"

Content

To fix error: command 'clang' failed with exit status 1 when running `pip install pycurl', install Command Line Tools from Xcode.

  1.     
  2. Open Xcode     
  3. Go to Preferences (Command + ,)     
  4. Select the Downloads tab / Components subtab     
  5. Install Command Line Tools

Then pip install with ARCHFLAGS set:

$ env ARCHFLAGS="-arch x86_64" pip install pycurl