我正在构建我的第一个 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/