使用更新的Python 2.6.2在Snow Leopard上安装Python Imaging Library(PIL) [英] Installing Python Imaging Library (PIL) on Snow Leopard with updated Python 2.6.2

查看:75
本文介绍了使用更新的Python 2.6.2在Snow Leopard上安装Python Imaging Library(PIL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我重新安装了Snow Leopard(从已擦除的驱动器开始),并在Snow Leopard的安装过程中安装了开发人员工具.

I have a fresh install (started with a wiped drive) of Snow Leopard with the developer tools installed during the Snow Leopard installation.

然后我安装了Python 2.6.2,替换了Snow Leopard默认的Python 2.6.1.我尝试通过以下方式安装PIL:

I then installed Python 2.6.2, replacing the Snow Leopard default python 2.6.1. I've tried to install PIL by:

  1. easy_install
  2. pip
  3. 下载源代码并手动运行python setup.py build.
  1. easy_install
  2. pip
  3. downloading source and running python setup.py build manually.

都产生相同的错误(链接到pip日志: http://drop.io/gi2bgw6).我已经看到其他人已经成功使用Snow Leopard默认python 2.6.1安装了PIL,所以我不确定为什么在使其与2.6.2一起使用时会遇到很多麻烦.

All yield the same error (link to pip log: http://drop.io/gi2bgw6). I've seen others have had success installing PIL using the Snow Leopard default python 2.6.1, so I'm not sure why I'm having so much trouble getting it to work with 2.6.2.

推荐答案

python.org Python是使用较早的gcc构建的.尝试使用gcc-4.0代替SL的默认值4.2:

The python.org Python was built with an earlier gcc. Try using gcc-4.0 instead of SL's default of 4.2:

export CC=/usr/bin/gcc-4.0

此处看到类似的问题.

这超越了stdarg问题.然后,您可能会遇到各种依赖库的后续构建问题.

That gets past the stdarg problem. You may then run into later build problems with various dependent libraries.

BTW,gcc-4.0和gcc-4.2都包含在Snow Leopard的Xcode 3 中,因此不需要其他安装.

BTW, gcc-4.0 and gcc-4.2 are both included with Snow Leopard's Xcode 3 so no additional installs are needed.

2011-05更新:请注意,较新的Xcode 4 已发布,可在10.6上进行实验使用,并且有望在10.7下成为标准配置,因此不再包含PPC支持,因此,如果安装Xcode 4,这个建议行不通.选项包括使用来自python.org的较新的64位/32-bin Python 2.7.x安装程序,或使用MacPorts,Homebrew或Fink安装较新的Python 2.6和PIL以及各种第三方库.

UPDATED 2011-05: Note, that the newer Xcode 4, released for experimental use with 10.6 and expected to be standard with 10.7, no longer includes PPC support so, if you install Xcode 4, this suggestion will not work. Options include using the newer 64-bit/32-bin Python 2.7.x installers from python.org or installing a newer Python 2.6 and PIL and the various 3rd-party libs using MacPorts, Homebrew, or Fink.

这篇关于使用更新的Python 2.6.2在Snow Leopard上安装Python Imaging Library(PIL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆