---
slug: "pipinstallpillow→error:command'cc'failedwithexitstatus1というエラーが出たら環境変数を追加"
title: "Add Environment Variables When You Encounter the Error \"pip install pillow → error: command 'cc' failed with exit status 1\""
description: "When running `pip install pillow`, you might encounter the following error:"
url: "https://www.ytyng.com/en/blog/pipinstallpillow→error:command'cc'failedwithexitstatus1というエラーが出たら環境変数を追加"
publish_date: "2014-03-20T23:30:35Z"
created: "2014-03-20T23:30:35Z"
updated: "2026-02-25T16:52:34.438Z"
categories: ["Python"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/fc783b66fdef4e7bbc67bb85da8e731e.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# Add Environment Variables When You Encounter the Error "pip install pillow → error: command 'cc' failed with exit status 1"

When running `pip install pillow`, you might encounter the following error:

```
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 -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/opt/X11/include/freetype2 -I/private/tmp/pip_build_root/pillow/libImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/opt/X11/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.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
```

In such a case, you can resolve the issue by executing the following commands:

```
(sudo su -)
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install pillow
```

Reference:
[clang error: unknown argument: '-mno-fused-madd' (python package installation failure) - Stack Overflow](http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa)
