Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google app engine 谷歌应用引擎PIL支持_Google App Engine_Python Imaging Library - Fatal编程技术网

Google app engine 谷歌应用引擎PIL支持

Google app engine 谷歌应用引擎PIL支持,google-app-engine,python-imaging-library,Google App Engine,Python Imaging Library,我在谷歌应用程序引擎的云上使用PIL时出错 ImportError: cannot import name _imaging at <module>():66 (Image.py:66 in /base/data...../lib/PIL) at <module>():6 (storage.py:6 in /base/data/home/...../modules/common) .... at <module>():1 (main.py:1 in /base

我在谷歌应用程序引擎的云上使用PIL时出错

ImportError: cannot import name _imaging
at <module>():66 (Image.py:66 in /base/data...../lib/PIL)
at <module>():6 (storage.py:6 in /base/data/home/...../modules/common)
....
at <module>():1 (main.py:1 in /base/data/home/apps/..../....456)
我还使用pip install PIL-t/lib将其保存到我的./lib文件夹中,以便进行本地开发

其他信息:
我之所以使用PIL,是因为它是一个具有google app engine支持的图像库

您实际上是在尝试运行PIL库的副本,而不是提供的副本(请参阅堆栈跟踪中的文件路径,其中包括您编辑的应用程序的详细信息)

不仅您不需要上传PIL库,实际上也不应该上传,因为提供的版本可能是专门为GAE python沙盒定制的版本


因此,请确保本地PIL安装不会将库或指向库的链接放在应用程序目录中的任何位置,以防止它意外地被出售到应用程序中并与之一起上载。

从您自己安装的lib文件夹中删除PIL模块

转到
app.yaml
并将其粘贴到库部分下(如果没有一个,则粘贴整个库)-

库:
-姓名:PIL
版本:最新版本

通过调用基于appengine的模块-


从PIL导入图像

IIRC您不需要上传它,因为它可以远程使用。但是,您确实需要在本地安装它。
libraries:
- name: webapp2
version: latest  
- name: jinja2
version: latest
- name:    PIL
version: "1.1.7"