when running easy_install PIL, I got the error: Setup script exited with error: command 'cc' failed with exit status 1

when running easy_install PIL, I got the error: Setup script exited with error: command 'cc' failed with exit status 1

我的系统环境是: MAC: OS X YOSEMITE 10.10.1 XCODE:版本 6.1.1 (6A2008a) Python: 2.7.6

当我运行"sudo easy_install PIL"时,出现错误:

error: Setup script exited with error: command 'cc' failed with exit status 1

有什么解决办法吗? 谢谢!

您缺少 xcode 的命令行工具。在终端提示符下键入 xcode-select --install