Skip to main content
Jupyter Notebooks
CHAPTER 02 Beginner

Installing Python, Jupyter, and VS Code

Updated: May 18, 2026
5 min read

# CHAPTER 2

Installing Python, Jupyter, and VS Code

1. Chapter Introduction

Before you can analyze data, you need the right tools. Setting up a Python environment can be confusing for beginners because there are multiple ways to do it. This chapter walks you through the industry-standard ways to install Python and Jupyter Notebook, focusing on Anaconda for beginners and VS Code integration for professionals.

Anaconda is a massive, all-in-one package. When you install Anaconda, you automatically get:

  1. 1. Python
  1. 2. Jupyter Notebook
  1. 3. Essential Data Science libraries (Pandas, NumPy, Matplotlib)
  1. 4. A graphical interface to manage it all.

Step-by-Step Installation:

  1. 1. Go to anaconda.com/download.
  1. 2. Download the installer for your operating system (Windows, macOS, Linux).
  1. 3. Run the installer. Leave all default settings (specifically, you *do not* need to check "Add Anaconda to my PATH" unless you know what you are doing).
  1. 4. Once installed, open the application called "Anaconda Navigator".

Launching Jupyter from Anaconda:

  1. 1. Inside Anaconda Navigator, you will see a grid of applications.
  1. 2. Find the tile labeled Jupyter Notebook.
  1. 3. Click Launch.
  1. 4. A black terminal window will open (do not close this!), followed by your default web browser opening to http://localhost:8888.

3. Method 2: pip Install (For Advanced Users)

If you already have Python installed and prefer a lightweight setup without Anaconda, you can use Python's package manager, pip.

Step-by-Step Installation:

  1. 1. Open your Terminal (Mac/Linux) or Command Prompt (Windows).
  1. 2. Run the following command:

bash
1
pip install notebook
  1. 3. Once the installation completes, start Jupyter by running:
bash
1
jupyter notebook
  1. 4. Your browser will open to the Jupyter interface.

4. Method 3: VS Code Integration (The Professional Choice)

Visual Studio Code (VS Code) is currently the most popular code editor in the world. It has built-in, seamless support for Jupyter Notebooks, allowing you to write notebooks without ever opening a web browser.

Step-by-Step Setup:

  1. 1. Download and install VS Code from code.visualstudio.com.
  1. 2. Open VS Code and click on the Extensions icon on the left sidebar (or press Ctrl+Shift+X).
  1. 3. Search for and install the "Python" extension (published by Microsoft).
  1. 4. Search for and install the "Jupyter" extension (published by Microsoft).

Creating a Notebook in VS Code:

  1. 1. Press Ctrl+Shift+P (Windows) or Cmd+Shift+P (Mac) to open the Command Palette.
  1. 2. Type Jupyter: Create New Blank Notebook and press Enter.
  1. 3. Save the file. Notice that it automatically saves with a .ipynb extension.

5. Understanding Localhost

When you launch Jupyter from the terminal or Anaconda, a web browser opens to a URL that looks like this: http://localhost:8888/tree

text
123456789101112
WHAT IS LOCALHOST?
─────────────────────────────────────────────────────────────────
Even though Jupyter opens in Chrome or Safari, it is NOT on the 
internet. "localhost" means "this computer". 

Jupyter runs a tiny, private web server in the background on your 
machine (usually on port 8888). The browser is just being used as 
the screen to display the interface.

If you disconnect from Wi-Fi, Jupyter Notebook will still work 
perfectly!
─────────────────────────────────────────────────────────────────

6. Mini Project: Hello World Notebook

Let's verify your installation works.

  1. 1. Launch Jupyter Notebook (via Anaconda, terminal, or VS Code).
  1. 2. Create a new Python 3 notebook.
  1. 3. Click on the first empty cell and type:

python
1234
print("Hello, Jupyter World!")
x = 10
y = 20
x + y
  1. 4. Hold Shift and press Enter to run the cell.
  1. 5. If you see the text "Hello, Jupyter World!" and the number 30 appear below the cell, your installation is successful!

7. Common Mistakes

  • Closing the Terminal Window: If you launch Jupyter from Anaconda or the command prompt, a black terminal window stays open in the background. If you close this window, the Jupyter server dies, and your browser interface will stop working. Minimize it, don't close it!
  • Multiple Python Installations: Installing Python from python.org, then installing Anaconda, can cause path conflicts. Stick to one method (Anaconda is best for beginners).

8. MCQs

Question 1

What is the easiest way for a beginner to install Python, Jupyter, and data science libraries all at once?

Question 2

When Jupyter opens in your web browser at localhost:8888, does it require an active internet connection?

Question 3

What happens if you close the black terminal window that opens when you launch Jupyter Notebook?

Question 4

Which VS Code extensions are required to run notebooks natively inside VS Code?

Question 5

What command do you type in the terminal to launch a pip-installed Jupyter Notebook?

Question 6

What file extension denotes a Jupyter Notebook file?

Question 7

In VS Code, how do you quickly create a new notebook using the keyboard?

Question 8

Anaconda Navigator is?

Question 9

If you just want a lightweight installation without the massive Anaconda package, you should use?

Question 10

How do you execute the code inside a Jupyter cell?

9. Interview Questions

  • Q: Explain the architecture of Jupyter. Why does it open in a web browser if it's running locally?
  • Q: What is the difference between setting up a project environment using Anaconda vs. using standard Python with pip/venv?

10. Summary

You have three main paths to set up Jupyter: Anaconda (best for absolute beginners, includes everything), pip (for users comfortable with the terminal), and VS Code (the modern professional standard). Regardless of how you launch it, Jupyter runs a local server on your machine (localhost) and uses your web browser as its graphical interface.

11. Next Chapter Recommendation

In Chapter 3: Understanding the Jupyter Interface, we will explore the dashboard, the toolbars, and the file system to understand how to navigate and manage your notebooks effectively.

Finish this Chapter

Save your progress on your learning path and prepare for coding interview challenges.

Discussion

Join the discussion

Log in or create a free account to participate.

Sort: ·