如何在 Mac OSX 10.5.8 上为 Google App Engine 安装 PIL?

如何在 Mac OSX 10.5.8 上为 Google App Engine 安装 PIL?

问题描述:

我需要在本地安装 PIL 以在本地环境中测试 GAE 的图像 API.

I need to get PIL installed locally to test GAE's images api in my local environment.

我获取了适用于 Mac 的 PIL 1.1.6 安装程序,当我去选择目的地(安装时)时,出现错误:

I grabbed the PIL 1.1.6 installer for Mac, and when I go to select the destination (when installing), I get the error:

You cannot install PIL 1.1.6 on this volume. 
PIL requires System Python 2.5 to install.

我在这台机器上安装了 Python 2.5.x.

I have Python 2.5.x on this machine.

注意:

添加了赏金.我真的需要一种方法来在我的 Mac 上本地测试图像 API.

Added a bounty. I am in real need of a way to test the image API locally on my Mac.

这很简单:

  1. 安装 MacPorts
  2. 使用sudo port install python25
  3. 安装Python 2.5
  4. 使用 sudo port install py25-pil
  5. 安装 Pil for Python 2.5
  6. 在 Google App Engine 启动器首选项中将 /opt/local/bin/python2.5 设置为 Python 路径 *
  7. 重新启动 Google App Engine 启动器
  8. 快乐编码

* 一定要回车确认,否则不会持续