我正在开发python google app engine应用程序,我正在使用python2.5,我想处理GAE(过滤图像)上的图像,最初我尝试了wit PIL库并且我成功安装了它并且我测试了它并且它可以工作在我的计算机上正确,但是当我在 localhost(在 GAE 上运行)上测试它时,我有一个错误NotImplementedError: Unable to find the Python PIL library
,然后我尝试使用 Images Python API 处理图像,如本教程中所示:https ://developers.google.com /appengine/docs/python/images/overview,并且我测试了调整图像大小服务,它工作正常,但我想要的主要应用程序是过滤图像,问题是:如果 GAE 中的图像 Python API 支持此服务(图像过滤)?我在 GAE 上过滤图像?我看到 PIL 中提供了此服务并对其进行了测试,但 GAE 在 python2.5 中不支持此库
编辑:
我尝试使用 python2.7 在 GAE 上使用 PIL 库作为https://developers.google.com/appengine/docs/python/python27/using27#Configuring_Libraries,我安装了 PIL 1.1.7,并配置了app.yaml文件作为:
application: app_id
version: 1
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /.*
script: main.py
libraries:
- name: PIL
version: "1.1.7"
现在我如何在 main.py 页面中使用这个库?我试过了from PIL import Image
,但问题仍然是:
No module named PIL
args = ('No module named PIL',)
message = 'No module named PIL'
提前致谢。