gpt4 book ai didi

python - Bokeh 与 Google App Engine 兼容吗?

转载 作者:行者123 更新时间:2023-11-30 22:43:23 25 4
gpt4 key购买 nike

我一直在解决这个问题Udacity web dev course并想尝试使用 this example 将简单的 Bokeh 图嵌入到网页中。运行 dev_appserver.py 会出现错误:

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 -

我可能是错的,但上面的错误与 this 结合在一起建议 Bokeh 需要 NumPy>1.6.1。具体来说,json_encoder.py 似乎需要 NumPy>1.6.1。

但是Google App Engine only supports NumPy1.6.1 。这是否意味着 Bokeh 实际上与 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"

最佳答案

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)。

我可以说,据我所知,Bokeh 核心团队中没有人使用过 GAE,因此没有人了解 NumPy 的限制也就不足为奇了。 NumPy 版本可能会放宽以包含 1.6.1。我不确定,这需要一些调查,并且不能保证它是可行的。如果时间和资源允许,我们当然可以尝试考虑它,所以我鼓励您在 Bokeh project issue tracker 上提出问题。 。另一个合理的行动是请求 GAE 更新他们的白名单,因为 NumPy 1.6.1 在这一点上相当古老。

关于python - Bokeh 与 Google App Engine 兼容吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41792504/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com