Thanks to theidioms.com

Installing and Importing Bokeh in Python

Tutorial

Installing and Importing Bokeh in Python

Installing and Importing Bokeh in PythonInstalling and Importing Bokeh in Python

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords high-performance interactivity over large or streaming datasets.

Bokeh

We will start by installing and importing the library in Python.


Installing Bokeh in Python using pip

Bokeh can be installed using python package manager pip as follows:

pip install bokeh 

Importing Bokeh in Python

Starting from this section onwards, we will be using Jupyter Notebooks as our Python IDE.

To import Bokeh in Python, write the following code and run it:

# Libraries/Modules import conventions
from bokeh.io import output_notebook, show
from bokeh.plotting import figure, output_file, show

Import sample data for bokeh

import bokeh.sampledata
# To download sample data for visualization
 bokeh.sampledata.download()

Check Bokeh version in Python

To check the version of the installed Bokeh library, write the following code and run it:

# Check version of bokeh installed
print(bokeh.__version__)  # version:1.4.0

This is it for the basic installation of Bokeh in Python. You are now ready to start plotting your own plots in Python.

Leave your thought here

Your email address will not be published. Required fields are marked *