Google App Engine支持xlrd吗? [英] Is xlrd supported in Google App Engine?

查看:92
本文介绍了Google App Engine支持xlrd吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾在Google网上论坛中看过帖子,这里提到在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不受支持。另外,在第三方库的列表中,我没有看到xlrd。



https://developers.google.com/appengine/docs/python/tools/libraries27



但是其他人似乎在GAE上使用它,GAE是否支持它?在过去,我能够成功导入numpy。这里是app.yaml。在main.py上我有import xlrd。

 应用程序:uploadsample 
版本:1
运行时:python27
api_version:1
threadsafe:是

处理程序:
- url:/favicon\.ico
static_files:favicon.ico
上传:favicon\\ \\ .ico

- url:。*
脚本:main.app

库:
- 名称:webapp2
版本: 2.5.1
- name:xlrd
version:0.7.3


您可以将任何纯粹的python第三方库包含在您的应用中。您不必在app.yaml中指定它们,这仅适用于Google在服务器上包含的第三方库。



xlrd本身不受支持,但它应该工作。


I have seen posts in Google Groups and here that mention using xlrd in Google App Engine:

How do you read excel files with xlrd on Appengine

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

but when I try to add it to the app.yaml file, it says "the library xlrd is not supported". Also, in the list of 3rd party libraries I don't see xlrd.

https://developers.google.com/appengine/docs/python/tools/libraries27

But then other people seem to be using it on GAE, so does GAE support it or not? In the past I was able to import numpy successfully. Here is app.yaml. On main.py I have "import xlrd". Thank you very much.

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"

解决方案

You can include any pure python third-party libraries with your app that you want. You don't specify them in app.yaml, that's only for third-party libraries that are included by Google on the servers.

xlrd is not "supported" per se, but it should work.

这篇关于Google App Engine支持xlrd吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆