可以PIL在Python 3(不枕)使用
问题描述:
的Python为Android项目,我在PIL食谱发现 https://github.com/kivy/python-for-android/blob/master/pythonforandroid/recipes/pil/init.py可以PIL在Python 3(不枕)使用
depends = [('python2', 'python3crystax'), 'png', 'jpeg']
是不是python3crystax为python3! 于是,我就看着办吧,我加入python3crystax在buildozer规范文件的要求,但错误appeares(预期)
我思念的东西
*****错误****
INFO]: Building compiled components in pil
[INFO]: -> directory context /home/sherif/Desktop/Project/.buildozer/android/platform/build/build/other_builds/pil-python3crystax/armeabi-v7a/pil
[INFO]: -> running python3.5 setup.py build_ext -v
working: File "setup.Exception in thread background thread for pid 27914:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 815, in handle_command_exit_code
raise exc
ErrorReturnCode_1:
RAN: /usr/bin/python3.5 setup.py build_ext -v
STDOUT:
File "setup.py", line 159
print "--- using Tcl/Tk libraries at", TCL_ROOT
^
SyntaxError: Missing parentheses in call to 'print'
STDERR:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in run_code
答
我不熟悉python-for-android和“python3crystax”。但在PIL website它说
目前的免费版本是PIL 1.1.7。此版本支持Python 1.5.2和更新版本,包括2.5和2.6。 3.X的版本将在稍后发布。
答
它看起来像python3crystax可选要求这里是一个错误。我会删除它。
我见过提出的枕头食谱,但都没有把它做成食谱。如果你喜欢,你可以找到一个使用。
答
否,PIL不支持的Python 3.
的Python在枕头中,保持PIL叉加入3支持,在version 2.0.0 released on 15th March 2013。
加入Python 3支持,改变了230个文件是一项非常大的工作。请参阅pull request。
PIL网站曾表示,自[2010](https://web.archive.org/web/20100324230344/http://www.pythonware.com:80/products/pil/)。从那以后,CPython 2.5和2.6都是[EOL](https://en.wikipedia.org/wiki/CPython#Version_history)。 – Hugo