0
我已经看到了谷歌组和这里的帖子中提到使用xlrd在谷歌应用程序引擎:Google App Engine支持xlrd吗?
How do you read excel files with xlrd on Appengine
但是当我尝试将其添加到app.yaml文件,它说“图书馆xlrd不支持”。另外,在第三方库列表中,我没有看到xlrd。
https://developers.google.com/appengine/docs/python/tools/libraries27
但随后其他人似乎可以用它在GAE上,所以不支持GAE或不?在过去,我能够成功导入numpy。这里是app.yaml。在main.py上我有“import xlrd”。非常感谢你。
application: uploadsample
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.1"
- name: xlrd
version: "0.7.3"
谢谢Wooble。当我从app.yaml中删除这些行时,它会显示:ImportError:没有名为xlrd的模块。但是当我自己运行Python IDLE时,我可以导入xlrd,没问题。你知道我怎么能解决这个问题吗?再次感谢。 – carlosgg
在部署应用程序目录时,您需要将该模块的副本包含在您的应用程序目录中。 – geoffspear
Woobie在这里是正确的。我们不提供'xldr'。您必须将其与您的应用一起上传。 –