Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Setting Up Your Bokeh Environment

In this lesson you’ll explore the various means to setup your Bokeh environment.

Installation options include: * Use Anaconda: Newer distributions include Jupyter, Pandas and Bokeh * PIP install any missing libraries into your main python environment * Use a Virtual Environment

The video covers the steps to setup a virtual environment, and installation of Pandas, Bokeh and Jupyter.

Check out these courses for more details on setting up a virtual environment and using Jupyter Notebooks.

Here are a few more links for more details on the libraries you are installing:

$ mkdir Bokeh
$ cd Bokeh
$ python3 -m venv venv

$ # macOS virtual environment activation
$ source venv/bin/activate

$ # Windows virtual environment activation
$ venv/Scripts/activate

$ # Everyone continue here
(venv) $ pip install pandas
(venv) $ pip install bokeh

$ # Optional
(venv) $ pip install jupyter

00:00 In this video, I’m going to show you a little bit about setting up your Bokeh environment. There’s a few different installation options for setting up Bokeh to work on your machine.

00:08 One is to use a distribution from Anaconda, and there are other tutorials on Real Python that show you about getting set up with Anaconda, which is a great tool for doing data science. Newer distributions include Jupyter, pandas, and Bokeh—all the tools that I’m going to show in this video.

00:23 The other would be to install any missing libraries into your main Python environment. So if you maybe already have Jupyter or pandas installed, maybe you just need to pip install bokeh.

00:31 Those are the three different libraries that you’ll need. For this course, I’m going to show you how to use a virtual environment to do this. If you need to learn more about using virtual environments, there are tutorials on Real Python and also a video course where you can learn more. First I’ll show you all the steps on the slide, and then I’ll give you a live demonstration inside the terminal. To do this, you need to be using Python 3.6 or higher. Inside your terminal, you’ll type python -m and venv, which is a command to create the virtual environment, and then venv, the directory that you’re going to create the virtual environment into. Next, you activate it. These are the commands you use on a Mac.

01:08 Once that’s activated, you’ll see the name of your virtual environment on the left side. Then you simply are going to pip install bokeh. Then you’ll install pandas.

01:17 And lastly, you’re going to pip install jupyter. I’d say installing Jupyter is optional since it’s only shown a couple of times in the course and you can just watch the demonstration if you’d like. Let me show you this.

01:29 For this tutorial, I’m going to use Visual Studio Code. I need to start off with creating a directory to put everything in. I’m going to name that directory Bokeh, and enter into that.

01:43 The next thing I’m going to do is create a virtual environment to teach the tutorial.

01:52 I’m going to use the command venv to create a virtual environment. The folder it’s going to create it into will be venv.

02:01 Once the virtual environment is created, which you can see here, I’m going to activate it. On a Mac, this is how you activate a virtual environment. From there, with that virtual environment ready to go, I can make sure which version of Python it’s using, which it’s taking from my virtual environment inside of the Bokeh/ directory.

02:26 That looks great. I’m going to pip install the three things that we’re going to need for this tutorial, which is bokeh,

02:37 pandas,

02:41 and the last thing I’m going to need is for a couple of examples I’m going to show Jupyter and the Jupyter Notebook system.

02:51 Great! With all that installed, you’re ready to begin. I’ll see you in the next video.

R morel on May 20, 2020

Okey whats next

Become a Member to join the conversation.