python - PIL for Python 3.2 on Windows 或替代品?

标签 python python-3.x tkinter

我正在构建我的第一个 Python 程序 :) 但是,我安装了 Python 3.2 而不是 2.7,因为较新的版本包含 TkInter。现在我找不到在其中使用 PIL 的方法。

我已阅读 this question但作为一个新手,这对我来说帮助不大。我安装了 zlib 和 libjpeg,但在构建 pil-py3k 时无法进一步。我不知道我应该在这里做什么:

# --------------------------------------------------------------------
# Library pointers.
#
# Use None to look for the libraries in well-known library locations.
# Use a string to specify a single directory, for both the library and
# the include files.  Use a tuple to specify separate directories:
# (libpath, includepath).  Examples:
#
# JPEG_ROOT = "/home/libraries/jpeg-6b"
# TIFF_ROOT = "/opt/tiff/lib", "/opt/tiff/include"
#
# If you have "lib" and "include" directories under a common parent,
# you can use the "libinclude" helper:
#
# TIFF_ROOT = libinclude("/opt/tiff")

FREETYPE_ROOT = None
JPEG_ROOT = None
TIFF_ROOT = None
ZLIB_ROOT = None
TCL_ROOT = None

有没有更简单的方法来启用 PIL 并支持 Python 3 的 PNG 和 JPEG?

一种选择是下载旧版本的 Python,但那样就没有 TkInter 了吗?

希望您能理解我是新人,所以如果我提出任何愚蠢的问题,请原谅我。 Python 看起来真的很酷! ;) 任何帮助表示赞赏。

最佳答案

Python 3.2 的非官方 PIL 就是答案 http://www.lfd.uci.edu/~gohlke/pythonlibs/

关于python - PIL for Python 3.2 on Windows 或替代品?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7407185/

相关文章:

python - Spyder 不运行代码中的新更改

python - 如何使用 pop 函数删除二维数组中的所有元素

python - 获取上一个条目

python - 使用 Tkinter 显示带有列的列表框?

赋值前引用了Python局部变量 'charcheck',为什么?

python - 如果后面或前面没有 < 或 >,则匹配单词

python - 是否可以将 python 库(以及与其相关的底层库)从一台计算机移植到另一台计算机?

python - 使用并发 future 时如何共享状态

python - 如何将这个列表理解扩展到 for 循环,以理解这个递归函数?

Python 3 - 获取对象的定义路径