Bokeh是否与Google App Engine兼容? [英] Is Bokeh compatible with Google App Engine?

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

问题描述

我一直在完成此 Udacity网络开发课程,并且想尝试使用此简单的bokeh图嵌入网页中例子.运行dev_appserver.py会给出错误:

I've been working through this Udacity web dev course and wanted to try embedding a simple bokeh plot into a web page using this example. Running dev_appserver.py gives the error:

ERROR    2017-01-22 14:35:30,358 wsgi.py:263]
Traceback (most recent call last):
  File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\main.py", line 2, in <module>
    from bokeh.plotting import figure
  File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\lib\bokeh\plotting\__init__.py", line 2, in <module
>
    from ..document import Document; Document
  File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\lib\bokeh\document.py", line 45, in <module>
    from .core.json_encoder import serialize_json
  File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\lib\bokeh\core\json_encoder.py", line 53, in <modul
e>
    NP_MS_DELTA = np.timedelta64(1, 'ms')
TypeError: function takes at most 1 argument (2 given)
INFO     2017-01-22 14:35:30,571 module.py:806] default: "GET / HTTP/1.1" 500 -

我可能是错的,但上述错误与提示Bokeh需要NumPy> 1.6.1.具体来说,json_encoder.py似乎需要NumPy> 1.6.1.

I may be wrong but the above error combined with this suggests Bokeh requires NumPy>1.6.1. Specifically it's json_encoder.py that seems to require NumPy>1.6.1.

但是 Google App Engine仅支持NumPy1.6.1 .这是否意味着Bokeh实际上与GAE不兼容?

However Google App Engine only supports NumPy1.6.1. Does this mean Bokeh is effectively not compatible with GAE?

app.yaml:

runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: main.app

libraries:
- name: jinja2
  version: latest
- name: numpy
  version: "1.6.1"

推荐答案

这是否意味着Bokeh实际上与GAE不兼容?

Does this mean Bokeh is effectively not compatible with GAE?

我想说这是对最新版本的相当准确的评估,例如Bokeh 0.12.4.似乎NumPy 1.7.1要求也可以一直追溯到项目的开始.但是,有时候Bokeh不太依赖NumPy,因此使用Bokeh的较早版本可能会带来更好的运气,或者1)未安装NumPy,或2)安装了较旧的GAE NumPy.我无法确定这一点,您只需要尝试看看(YMMV).

I would say this is a fairly accurate assessment for recent versions, e.g Bokeh 0.12.4. It also appears that the NumPy 1.7.1 requirement goes all the way back to the beginning of the project. However, there was a time when Bokeh depended less on NumPy, so it's possible you might have better luck with older versions of Bokeh and either 1) no NumPy installed, or 2) the older GAE NumPy installed. I can't state this for certain, you'd just have to try and see (YMMV).

我可以说Bokeh核心团队的AFAIK中没有人使用过GAE,因此没人对那里的NumPy限制一无所知也就不足为奇了. NumPy版本可能被放宽以包含1.6.1.我不确定,这需要进行一些调查,并且不能保证这将是可行的.在时间和资源允许的情况下,我们当然可以考虑考虑,因此,我鼓励您在

I can state that AFAIK no-one on the Bokeh core team has used GAE, so it's not surprising that no-one knew anything about the NumPy limitation there. It's perhaps possible that the NumPy version could be loosened to include 1.6.1. I don't know for sure, it would take some investigation, and there are no guarantees that it would be feasible. We can certainly try to consider it, as time and resources permit, so I'd encourage you to make an issue on the Bokeh project issue tracker. Another reasonable action would be to petition GAE to update their whitelist, as NumPy 1.6.1 is fairly ancient at this point.

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

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