Install Pillow with pip on OS X Mavericks 10.9.1

๐Ÿ•’  Posted

I recently ran into an issue on Mavericks where installing the python package Pillow would not install correctly and error out on my, referencing a clang error that I was in no mood to debug.

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

I Googled a solution for about 20 minutes until I found this: before running pip install, run this

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

Update: Iโ€™ve noticed as of version 5.1.0.0.1.1396320587 of XCode Command Line Tools, the above temp-fix doesnโ€™t seem to work is youโ€™re using sudo to install a package. To use sudo, make sure you append the -E flag

sudo -E pip install PACKAGE

Sources:

โ€ฆ

I want to hear from you, dear reader ๐Ÿ˜„
If you enjoyed this content, please let me know on Twitter.