如何在 Mac OSX 10.5.8 上为 Google App Engine 安装 PIL? [英] How to install PIL on Mac OSX 10.5.8 for Google App Engine?

查看:34
本文介绍了如何在 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. 快乐编码

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

这篇关于如何在 Mac OSX 10.5.8 上为 Google App Engine 安装 PIL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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