我是一名极其业余的程序员;我做过一些休闲算法编程,但实际上我不知道库和编程语言如何真正地结合在一起。我要处理一些图像处理项目,所以我一直尝试安装PIL,但一直没有成功。
我去了http://www.pythonware.com/products/pil/并下载了"Python Imaging Library 1.1.6源码包(所有平台)(440k TAR GZ)(2006年12月3日)"。然后我在命令提示符中打开了该文件夹,并运行了
这是我得到的输出结果:
我去了http://www.pythonware.com/products/pil/并下载了"Python Imaging Library 1.1.6源码包(所有平台)(440k TAR GZ)(2006年12月3日)"。然后我在命令提示符中打开了该文件夹,并运行了
$ python setup.py build_ext -i .
这是我得到的输出结果:
running build_ext
--- using frameworks at /System/Library/Frameworks
building '_imaging' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -DHAVE_LIBZ -IlibImaging -I/opt/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.5/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _imaging.c -o build/temp.macosx-10.5-i386-2.5/_imaging.o
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
当我尝试使用"import Image"时,出现了错误。
你们有任何想法是怎么回事吗?我正在使用一台配备Core 2 Duo的MacBook Pro。
如果我的问题太愚蠢,请原谅。