OS X上的PIL(等等) [英] PIL (etc etc etc) on OS X

查看:75
本文介绍了OS X上的PIL(等等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

决定尝试在我的Mac上安装PIL(OS X.5)。


我对在Linux上安装程序一无所知,

没什么关于建立C程序,没有任何关于

安装库,没有关于fink,没有什么

关于任何事情。请在

后面插入问号:


我看到了BUILDME字样。说明对于懒惰的程序员。

我这样做了。似乎除了一个

jpg库之外的一切都工作了。


我读到我需要安装libjpeg。我在OS X上读到了这个,通常是通常。使用fink完成。太棒了:


(i)安装fink的想法让我感到害怕,无缘无故

我可以说出来。没有办法让他们混淆剩下的达尔文,对吗?


(ii)当我看到fink网站时我看到了一个

支持的库列表,不包括libjpeg。


我讨厌弄乱_all _... <我不理解的东西br />

感谢您的任何建议或意见。


DU。


****** ******************************************** ****** **********


PIL 1.1.6构建概要

-------------- -------------------------------------------------- ----

版本1.1.6

平台darwin 2.5.1(r251:54863,2008年1月17日,19:35:17)

[GCC 4.0.1(Apple Inc. build 5465)]

--------------------------- -----------------------------------------

- - TKINTER支持确定

***不支持JPEG支持

--- ZLIB(PNG / ZIP)支持确定

--- FREETYPE2支持确定

--------------------- -----------------------------------------------

要添加缺少的选项,请确保您具有所需的

库,并在

setup.py脚本中设置相应的ROOT变量。 />

要检查构建,请运行selftest.py脚本。

0-1d-4f-fc-28-d:Imaging-1.1.6 dullric $ python selftest.py

************************************* *********** ***************

示例失败:_info(Image.open(" Images / lena。 jpg"))
来自selftest.testimage第24行的


异常提升:

回溯(最近一次调用最后一次):

文件" ./ doctest.py",第499行,_run_examples_inner

exec编译(来源,"< string>"," single")in globs

文件"< string>",第1行,在< module>

文件" ./ selftest.py",第22行,在_info

im.load()

文件" PIL / ImageFile.py",第180行,in加载

d = Image._getdecoder(self.mode,d,a,self.decoderconfig)

文件" PIL / Image.py",第375行,_getdecoder

引发IOError(解码器%s不可用) %decoder_name)

IOError:解码器jpeg不可用

1件商品出现故障:

1 of 57 in selftest.testimage

***测试失败*** 1次失败。

*** 1次57次测试失败。


-

David C. Ullrich

Decided to try to install PIL on my Mac (OS X.5).

I know nothing about installing programs on Linux,
nothing about building C programs, nothing about
installing libraries, nothing about "fink", nothing
about anything. Please insert question marks after
every sentence:

I saw a "BUILDME" with instructions "for lazy programmers".
I did that. It seems that everything worked except a
jpg library is missing.

I read that I need to install libjpeg. I read that on OS X
this is "usually" done using fink. Great:

(i) The idea of installing fink scares me, for no reason
I could name. There''s no way that''s going to confuse the
rest of Darwin, right?

(ii) When I look at the fink website I see a list of
supported libraries, not including libjpeg.

I hate messing with things that I don''t understand at _all_...

Thanks for any advice or comments.

DU.

************************************************** ****************

PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.6
platform darwin 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)]
--------------------------------------------------------------------
--- TKINTER support ok
*** JPEG support not available
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.
0-1d-4f-fc-28-d:Imaging-1.1.6 dullric$ python selftest.py
************************************************** ***************
Failure in example: _info(Image.open("Images/lena.jpg"))
from line #24 of selftest.testimage
Exception raised:
Traceback (most recent call last):
File "./doctest.py", line 499, in _run_examples_inner
exec compile(source, "<string>", "single") in globs
File "<string>", line 1, in <module>
File "./selftest.py", line 22, in _info
im.load()
File "PIL/ImageFile.py", line 180, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "PIL/Image.py", line 375, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
1 items had failures:
1 of 57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.

--
David C. Ullrich

推荐答案

python selftest.py

********** **************************************** ********** *****

示例失败:_info(Image.open(" Images / lena.jpg"))
来自selftest.testimage第24行的


异常提出:

回溯(最近一次调用最后一次):

文件" ./ doctest.py",第499行,_run_examples_inner

exec编译(来源,"< string>"," single")in globs

文件"< string>",第1行,in < module>

文件" ./ selftest.py",第22行,在_info

im.load()

文件" ; PIL / ImageFile.py",第180行,加载

d = Image._getdecoder(self.mode,d,a,self.decoderconfig)

文件" PIL / Image.py",第375行,_getdecoder
引发IOError(解码器%s不可用) %decoder_name)

IOError:解码器jpeg不可用

1件商品出现故障:

1 of 57 in selftest.testimage

***测试失败*** 1次失败。

*** 1次57次测试失败。


-

David C. Ullrich
python selftest.py
************************************************** ***************
Failure in example: _info(Image.open("Images/lena.jpg"))
from line #24 of selftest.testimage
Exception raised:
Traceback (most recent call last):
File "./doctest.py", line 499, in _run_examples_inner
exec compile(source, "<string>", "single") in globs
File "<string>", line 1, in <module>
File "./selftest.py", line 22, in _info
im.load()
File "PIL/ImageFile.py", line 180, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "PIL/Image.py", line 375, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
1 items had failures:
1 of 57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.

--
David C. Ullrich


David C. Ullrich写道:
David C. Ullrich wrote:

决定尝试安装PIL在我的Mac上(OS X.5)。
Decided to try to install PIL on my Mac (OS X.5).



好​​的,听起来不错。

OK, sounds good.


>

我对在Linux上安装程序一无所知,

没有关于构建C程序的信息,没什么关于

安装库,没有关于fink,没有什么

关于任何事情。请在

后面插入问号:
>
I know nothing about installing programs on Linux,
nothing about building C programs, nothing about
installing libraries, nothing about "fink", nothing
about anything. Please insert question marks after
every sentence:



为了记录,OS X不是Linux - 它是一个变种BSD Unix。类似的,

但与Linux不相同。

For the record, OS X isn''t Linux--it''s a variant of BSD Unix. Similar,
but no identical, to Linux.


>

我看到了一个BUILDME。说明对于懒惰的程序员。

我这样做了。似乎一切正常,除了一个

jpg库缺失了。
>
I saw a "BUILDME" with instructions "for lazy programmers".
I did that. It seems that everything worked except a
jpg library is missing.



OK。

OK.


>

我读到我需要安装libjpeg。我在OS X上读到了这个,通常是通常。使用fink完成。太棒了:


(i)安装fink的想法让我感到害怕,无缘无故

我可以说出来。没有办法让他们混淆剩下的达尔文,对吗?
>
I read that I need to install libjpeg. I read that on OS X
this is "usually" done using fink. Great:

(i) The idea of installing fink scares me, for no reason
I could name. There''s no way that''s going to confuse the
rest of Darwin, right?



你不需要Fink只是为了安装libjpeg。你确实需要安装

开发者工具(Xcode),否则你根本不能构建任何

软件。


可以从 http://www.ijg.org/ 下载Libjpeg。下载它,<​​br />
解压缩/解压缩它。启动终端,cd到libjpeg目录,然后键入

这些命令:


configure

make

sudo make install


应该建立和安装libjpeg。

You don''t really need Fink just to install libjpeg. You do need the
developer tools (Xcode) installed, otherwise you can''t build any
software at all.

Libjpeg can be downloaded from http://www.ijg.org/. Download it,
untar/unzip it. Fire up terminal, cd to the libjpeg directory, and type
these commands:

configure
make
sudo make install

That should get libjpeg built and installed.


>

(ii)当我查看fink网站时,我看到了一个

支持的库列表,不包括libjpeg。
>
(ii) When I look at the fink website I see a list of
supported libraries, not including libjpeg.



所以不要担心芬克。

So don''t worry about Fink.


>

我讨厌弄乱我不理解的东西_all _...
>
I hate messing with things that I don''t understand at _all_...



嗯,这是可以理解的,但这是你学习东西的机会

新。

Well, that''s understandable, but this is your chance to learn something
new.


>

感谢您的任何建议或意见。


DU。
>
Thanks for any advice or comments.

DU.



- 凯文


-

Kevin Walzer

代码来自Kevin
http://www.codebykevin.com




David C. Ullrich写道:

David C. Ullrich wrote:

决定尝试在我的Mac上安装PIL(OS X.5)。


我对在Linux上安装程序一无所知,

没有关于构建C程序的信息,没有关于

安装库,没有关于fink,没有任何东西

关于任何事情。请在

后面插入问号:
Decided to try to install PIL on my Mac (OS X.5).

I know nothing about installing programs on Linux,
nothing about building C programs, nothing about
installing libraries, nothing about "fink", nothing
about anything. Please insert question marks after
every sentence:



不需要。

只需从下载预编译的安装包 http://pythonmac.org/packages/


我刚刚在两天前安装了PIL 1.1.6,使用了这个网站的Python 2.5软件包:)

(PPC mac mini上的OS X 10.4.11)


--irmen

Not needed.
Just download a precompiled installation package from http://pythonmac.org/packages/

I just installed PIL 1.1.6 two days ago, using the Python 2.5 package from this site :)
(OS X 10.4.11 on a PPC mac mini)

--irmen


这篇关于OS X上的PIL(等等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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