How to Install Jupyter Notebook in Python step by step
If you just started learning Python, one of the first tools you will hear about is Jupyter Notebook. It is one of the most popular tools used by data scientists, data analysts, and Python beginners worldwide.
The good news is that installing it takes less than 10 minutes, and this guide walks you through every single step. By the end of this post, you will have Jupyter Notebook running on your computer, ready for you to write and run Python code.
What is Jupyter Notebook?
Jupyter Notebook is a free, open-source web application that lets you write Python code, run it immediately, and see the results right inside your browser. Think of it as a mix between a notepad and a Python code runner.
Instead of writing all your code in one big file and running it at once, Jupyter lets you break your code into small sections called cells. You run each cell one at a time, which makes it much easier to test, learn, and fix mistakes.
Why Use Jupyter Notebook?
Here are the top reasons why Jupyter Notebook is loved by beginners and professionals alike:
- Instant Results: You run one block of code at a time and see the output immediately below it. No waiting for the whole script to finish.
- Great for Data Work: It displays tables, charts, and graphs directly inside the notebook. This makes it the go-to tool for Pandas and Matplotlib.
- Easy to Share: You can share your notebook as a
.ipynbfile or export it as a PDF or HTML page. - Supports Text and Notes: You can add plain-English explanations, headings, and notes between your code blocks using Markdown.
- Used Everywhere: Data scientists at companies like Google, Netflix, and NASA use Jupyter Notebook as part of their daily workflow.
What You Need Before Installing
Before you install Jupyter Notebook, make sure you have these two things ready on your computer.
Python 3.8 or Higher
Jupyter Notebook runs on top of Python, so Python must be installed first. Download it from the official Python website if you have not done so. To check if Python is already installed, open your terminal or command prompt and type:
python --version
If you see something like this Python 3.11.2, you are good to go.
pip (Python's Package Installer)
pip is the tool that downloads and installs Python packages for you. It usually comes bundled with Python automatically. To confirm it is installed, type:
pip --version
If you see a version number, pip is ready. If not, follow the official pip installation guide.
How to Install Jupyter Notebook Using pip
This is the most common method. Follow these steps one at a time.
Step 1: Open Your Terminal or Command Prompt
On Windows, press Windows Key + R, type cmd, and press Enter. On Mac, press Command + Space, type Terminal, and press Enter. On Linux, press Ctrl + Alt + T.
Step 2: Upgrade pip First (Recommended)
Run this command to make sure your pip is up to date before installing anything:
# Windows python -m pip install --upgrade pip # Mac or Linux pip3 install --upgrade pip
Step 3: Install Jupyter Notebook
Now run this command to install Jupyter Notebook:
# Windows pip install notebook # Mac or Linux pip3 install notebook
You will see a progress bar as the installation runs. It usually takes 1 to 3 minutes depending on your internet speed.
Step 4: Confirm the Installation
Once it finishes, confirm everything worked by checking the version:
jupyter notebook --version
If you see a version number like this 7.2.1, the installation was successful. You are ready to move on.
How to Install Jupyter Notebook Using Anaconda
Anaconda is the easiest option if you are serious about data science. It sets up everything for you in one go.
- Download Anaconda from the official Anaconda download page. Choose your operating system (Windows, Mac, or Linux).
- Run the installer and follow the on-screen steps. Accept all default settings.
- On Windows, check the box that says "Add Anaconda to my PATH environment variable" during setup.
- After installation, open Anaconda Navigator from your Start Menu or Applications folder.
- Find Jupyter Notebook in the list of tools and click the Launch button.
How to Launch Jupyter Notebook
Once Jupyter is installed, launching it is a one-line command. Open your terminal or command prompt and type:
jupyter notebook
Jupyter Notebook will open automatically in your default web browser. You will see a file browser that shows the contents of the folder you launched it from.
Launch from a Specific Folder
If you want Jupyter to open inside a specific project folder, navigate to that folder first and then launch:
# Navigate to your project folder first cd Documents/my-python-project Then launch Jupyter jupyter notebook
How to Create Your First Notebook
Once Jupyter opens in your browser, follow these steps to write and run your first Python code.
- Click the "New" button in the top right corner of the Jupyter dashboard.
- From the dropdown, select Python 3 (ipykernel). A new notebook opens in a new browser tab.
- Click inside the first cell (the empty grey box at the top) and type this line:
print("Hello from Jupyter Notebook!")
4. Press Shift + Enter on your keyboard to run the cell. The output appears directly below it:
Hello from Jupyter Notebook!
5. Press Ctrl + S (Windows/Linux) or Command + S (Mac) to save your notebook. It saves as a .ipynb file.
Shift + Enter Run the current cell and move to the next oneCtrl + Enter Run the current cell and stay on itA Insert a new cell above (press Escape first to exit edit mode)B Insert a new cell below
Common Errors and How to Fix Them
Here are the most common problems beginners run into and how to fix each one.
Error 1: 'jupyter' is not recognized as an internal command
What it means: Python or pip was not added to your system PATH during installation.
Fix: Reinstall Python from python.org and make sure you tick the box that says "Add Python to PATH" during setup.
Error 2: ModuleNotFoundError: No module named 'notebook'
What it means: Jupyter was not installed correctly, or it was installed in a different Python environment.
Fix: Run pip install notebook again and confirm you are using the correct Python environment.
Error 3: Connection refused on localhost:8888
What it means: Jupyter's server did not start properly, or the port is already being used by another application.
Fix: Close the terminal, reopen it, and run jupyter notebook again. You can also try a different port by running: jupyter notebook --port 8889
Error 4: Kernel not found
What it means: The Python kernel (the engine that actually runs your code) is missing.
Fix: Run pip install ipykernel in your terminal, then restart Jupyter Notebook.
Conclusion
Here is a quick recap of everything covered in this guide:
- Jupyter Notebook is a browser-based tool for writing and running Python code in small cells
- You need Python 3.8 or higher and pip installed before you begin
- Install it with
pip install notebook(pip method) or through the Anaconda installer - Launch it by typing
jupyter notebookin your terminal - Create a new notebook, write your first line, and press
Shift + Enterto run it - Common errors are easy to fix once you know what they mean
What to Do Next
Now that Jupyter Notebook is set up, the next step is to fill it with the right tools. Read Post 2 to discover the top Python libraries every data analyst must know in 2026.
10 Python Libraries for Data Analysts
Post a Comment