在OSX Mountain Lion for Google App Engine上安装PIL, [英] Installing PIL on OSX Mountain Lion for google app engine,

查看:85
本文介绍了在OSX Mountain Lion for Google App Engine上安装PIL,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道关于SO以及网络上的论坛和博客文章有很多问题,但是我一直遇到同样的问题.我正在尝试安装PIL以将其用于App Engine成像API.在 api概述中,Google建议从 pythonmac.org .

I know there are many questions on SO, and forum and blog posts around the web, but I keep running into the same problems. I'm trying to install PIL to use it for the app engine imaging api. In the api overview, google suggests installing it from pythonmac.org.

当我尝试安装那里提供的dmg时,它告诉我它需要将python 2.5安装为系统python.稍微搜索一下该错误,就向我提出了这样的问题:

When I try to install the dmg provided there, it tells me that it requires python 2.5 to be installed as the system python. A little googling around for this error, pointed me to this SO question: How to install PIL on Mac OSX 10.5.8 for Google App Engine?. In the first answer for that, I did step 1, I installed macports. Then, step 2 told me to run sudo port install python25.

这给了我以下错误:

Error: org.macports.activate for port expat returned: Image error: /opt/local/bin/xmlwf already exists and does not belong to a registered port.  Unable to activate port expat. Use 'port -f activate expat' to force the activation.
Error: Failed to install expat
Please see the log file for port expat for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_expat/expat/main.log
Error: The following dependencies were not installed: gettext expat libiconv ncurses libedit openssl zlib python_select sqlite3
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port python25 failed

有关macports的完整输出,请参见此pastebin

For the full output of macports, see this pastebin

如果无法解决问题,经过更多的搜索后,我来到了

When that didn't work out, a bit more googling brought me to this blog post. I installed libjpeg, as it suggests. The following steps it suggests are:

  1. http://effbot.org/downloads下载PIL /Imaging-1.1.7.ta​​r.gz . (如果已安装PIL,请先将其删除.)

  1. Download PIL from http://effbot.org/downloads/Imaging-1.1.7.tar.gz. (Remove PIL first if installed already.)

在解压缩的文件夹中: python setup.py build --force sudo python setup.py安装

In the unpacked folder: python setup.py build --force sudo python setup.py install

但是当我尝试运行python setup.py build --force时,出现了此错误:

But when I tried running python setup.py build --force, I got this error:

_imaging.c:3017: warning: initialization from incompatible pointer type
_imaging.c:3077: warning: initialization from incompatible pointer type
lipo: can't figure out the architecture type of: /var/folders/q_/wgr019b53rx9b2lr3y7867bm0000gn/T//ccJY6hPI.out
error: command 'gcc-4.2' failed with exit status 1

有关完整输出,请检查此粘贴框.

for the full output, check this pastebin.

我还尝试了其他一些方法,我将对其进行编辑,但是我希望尽快将此内容发布. 提前谢谢.

There are some other things I've tried, and I'll edit those in, but I want to get this posted asap. thx in advance.

推荐答案

一种方法是枕头.克隆人正好厌倦了这些类型的头痛和分叉的PIL.

One approach is Pillow. The Plone folks got sick of exactly these types of headaches and forked PIL.

Pillow是PIL的直接替代品,而PIL并不是构建和安装噩梦.

Pillow is a drop-in replacement for PIL that isn't a nightmare to build and install.

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

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