我正在构建我的第一个 Python 程序:)但是,我安装了 Python 3.2 而不是 2.7,因为较新的版本有TkInter
包括。现在我找不到在其中使用PIL的方法。
我读过了这个问题 https://stackoverflow.com/questions/3896286/image-library-for-python-3但作为一个新人,这对我来说没有太大帮助。我安装了 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
有没有更简单的方法来为 Python 3 启用具有 PNG 和 JPEG 支持的 PIL?
一种选择是下载旧版本的 Python,但这样就不会出现TkInter
?
我希望你明白我是一个新人,所以如果我提出任何愚蠢的问题,请原谅我。 Python 看起来真的很酷! ;) 如有任何帮助,我们将不胜感激。
Python 3.2 的非官方 PIL 就是答案http://www.lfd.uci.edu/~gohlke/pythonlibs/ http://www.lfd.uci.edu/~gohlke/pythonlibs/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)