0

我在 Google Groups 和这里看到过在 Google App Engine 中使用 xlrd 的帖子:

如何在 Appengine 上使用 xlrd 读取 excel 文件

https://groups.google.com/forum/?fromgroups=#!searchin/google-appengine-python/xlrd/google-appengine-python/lMix6vXhvtA/O_ExzkGhsKEJ

但是当我尝试将它添加到 app.yaml 文件时,它显示“不支持库 xlrd”。此外,在 3rd 方库列表中,我没有看到 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"
4

1 回答 1

3

你可以在你的应用程序中包含任何你想要的纯 python 第三方库。您没有在 app.yaml 中指定它们,这仅适用于 Google 在服务器上包含的第三方库。

xlrd 本身不受“支持”,但它应该可以工作。

于 2012-10-30T14:00:30.167 回答