Bokeh 简明教程
Bokeh - Environment Setup
只能使用标准发行版和 Anaconda 发行版在 CPython 版本 2.7 和 3.5+ 上安装 Bokeh。在撰写本教程时,Bokeh 的当前版本是版本 1.3.4。Bokeh 包具有以下依赖关系 -
Bokeh can be installed on CPython versions 2.7 and 3.5+ only both with Standard distribution and Anaconda distribution. Current version of Bokeh at the time of writing this tutorial is ver. 1.3.4. Bokeh package has the following dependencies −
-
jinja2 >= 2.7
-
numpy >= 1.7.1
-
packaging >= 16.8
-
pillow >= 4.0
-
python-dateutil >= 2.1
-
pyyaml >= 3.10
-
six >= 1.5.2
-
tornado >= 4.3
通常,使用 Python 的内置包管理器 PIP 安装 Bokeh 时,会自动安装上述包,如下所示:
Generally, above packages are installed automatically when Bokeh is installed using Python’s built-in Package manager PIP as shown below −
pip3 install bokeh
如果你使用 Anaconda 发行版,请按以下方式使用 conda 包管理器:
If you are using Anaconda distribution, use conda package manager as follows −
conda install bokeh
除了上述依赖项之外,你可能需要其他包,例如 pandas、psutil 等,以满足特定目的。
In addition to the above dependencies, you may require additional packages such as pandas, psutil, etc., for specific purposes.
要验证 Bokeh 是否已成功安装,请在 Python 终端中导入 bokeh 包并检查其版本:
To verify if Bokeh has been successfully installed, import bokeh package in Python terminal and check its version −
>>> import bokeh
>>> bokeh.__version__
'1.3.4'