Introduction to Data Science · Student guide

Set up Python for the course

Follow the section for your computer. At the end, you will have Python, the main data analysis packages, and Jupyter Notebook ready to use.

For Windows 11, macOS, and Ubuntu · Checked September 2026
Before you begin

Choose your operating system

We use conda to make a separate Python environment called ids-2026. An environment is a set of packages for one project. We will install Jupyter Notebook in that environment and use it for the course.

Read commands carefully: run commands in a terminal, one command at a time. Press Enter after each one. Do not type the examples into a notebook cell. You need an internet connection for downloads and package installation.

If you already have a working conda installation, keep it. Open its Anaconda Prompt or terminal and start at “Create the course environment” in your section.

What the course environment contains

PackageTypical use
numpy, scipyArrays, mathematics, statistics, and scientific methods
pandas, openpyxlTables, CSV files, and Excel files
matplotlib, seabornPlots and data visualization
scikit-learn, statsmodels, sympyBasic machine learning, statistical models, and symbolic mathematics
notebook, ipykernelJupyter Notebook and its Python kernel (the process that runs notebook code)
Part 1 · Windows 11

Install on Windows 11

The simplest route is Anaconda Distribution on Windows. It installs Python and conda. You will use the Anaconda Prompt to create and run the course environment. VS Code is an optional editor. WSL is an optional way to run Linux on Windows.

  1. Install Anaconda Distribution

    Open the official Anaconda download page. Select Anaconda Distribution → Windows 64-Bit Graphical Installer. Download and open the .exe file from Downloads. Follow the installer. Select Just Me if asked, keep the suggested location, and finish the installation. Use the standard options; there is no need to add Anaconda to the Windows PATH.

    If the download page asks for an account, follow its instructions or use “Skip to download” if offered.

  2. Open Anaconda Prompt

    Open the Windows Start menu, type Anaconda Prompt, and open it. Enter this command to check conda:

    conda --version

    You should see a version number. The prompt may begin with (base); that is normal.

  3. Create the course environment

    Copy this full line into Anaconda Prompt. The download can take several minutes. When asked to proceed, type y and press Enter.

    conda create -n ids-2026 python=3.12 numpy scipy pandas matplotlib seaborn scikit-learn statsmodels sympy openpyxl notebook ipykernel pip

    Next, activate the environment:

    conda activate ids-2026

    The beginning of the prompt should now show (ids-2026).

  4. Make a folder and open Jupyter Notebook

    Run these commands in the same Anaconda Prompt, one line at a time. The first command goes to your home folder; the second makes a course folder.

    cd /d "%USERPROFILE%"
    mkdir intro-data-science
    cd intro-data-science
    jupyter notebook

    A browser page should open. If it does not, copy the full http://localhost:... address shown in Anaconda Prompt into your browser. Keep Anaconda Prompt open while you work.

Ready? Go to Your first notebook and run the short test.

Optional: edit notebooks in Visual Studio Code

Install Visual Studio Code. In VS Code, open Extensions and install the Microsoft Python and Jupyter extensions. Open your intro-data-science folder, then open or create a .ipynb file. Click Select Kernel at the top right and select the Python environment named ids-2026. Your normal browser-based Jupyter Notebook already works without VS Code.

Optional: use WSL (Ubuntu inside Windows)

WSL means Windows Subsystem for Linux. Use it if your instructor asks you to work with Linux commands. Open PowerShell as Administrator, enter the command below, and restart Windows if requested:

wsl --install

Launch Ubuntu from the Start menu. On first launch, make a Linux username and password; the password will not appear while you type. Then follow the Ubuntu section inside the Ubuntu terminal, including installing Anaconda again for Linux. The Windows Anaconda installation and the WSL Linux installation are separate. Keep course files in your Linux home folder when using WSL.

Part 2 · macOS

Install on macOS

First, find your Mac type: open the Apple menu → About This Mac. Look for Chip (Apple M series) or Processor (Intel). Then choose the matching installation step below.

  1. Install conda for your Mac

    Apple Silicon (M1, M2, M3, M4, or newer)

    Use the official Anaconda download page. Select Anaconda Distribution → macOS → 64-Bit (Apple silicon) Graphical Installer. Open the downloaded .pkg, follow the instructions, and finish. Open a new Terminal (press Command + Space, type “Terminal”, and press Enter).

    Intel Mac

    New Anaconda Distribution installers for Intel macOS are no longer produced. Use Miniforge for Intel macOS instead. Download the Intel x86_64 .pkg, open it, follow the instructions, and select the option to initialize conda for your shell if offered. Open a new Terminal. Miniforge provides the same conda commands used below, but its packages come from conda-forge.

    In Terminal, check the installation:

    conda --version

    You should see a version number. If you see “command not found,” close Terminal, reopen it, and try again.

  2. Create the course environment

    Run the command below in Terminal. When asked to proceed, type y and press Enter. This may take several minutes.

    conda create -n ids-2026 python=3.12 numpy scipy pandas matplotlib seaborn scikit-learn statsmodels sympy openpyxl notebook ipykernel pip

    Activate it:

    conda activate ids-2026

    The prompt should show (ids-2026).

  3. Make a folder and open Jupyter Notebook

    Run these lines in Terminal:

    mkdir -p ~/intro-data-science
    cd ~/intro-data-science
    jupyter notebook

    Jupyter should open in your browser. If it does not, copy the full http://localhost:... address from Terminal into the browser. Leave Terminal open while Jupyter runs.

Ready? Go to Your first notebook and run the short test.
Part 3 · Ubuntu

Install on Ubuntu

Use a Terminal (often Ctrl + Alt + T). These steps also work in the Ubuntu terminal inside Windows WSL.

  1. Download Anaconda Distribution

    Most laptops use the x86_64 version. Check your computer first:

    uname -m

    If the answer is x86_64, copy these commands (one at a time). The filename below is the version in Anaconda’s Linux instructions at the time this guide was checked.

    cd ~
    curl -O https://repo.anaconda.com/archive/Anaconda3-2026.07-1-Linux-x86_64.sh
    bash Anaconda3-2026.07-1-Linux-x86_64.sh

    If uname -m says aarch64, use the Linux ARM64 installer instead:

    cd ~
    curl -O https://repo.anaconda.com/archive/Anaconda3-2026.07-1-Linux-aarch64.sh
    bash Anaconda3-2026.07-1-Linux-aarch64.sh

    If curl is missing, install it with sudo apt update followed by sudo apt install curl, or download the appropriate Linux installer from the official Linux instructions.

  2. Complete the installer

    Press Enter to start reading the terms. Press Space to move through them; enter yes if you agree. Press Enter to accept the default install location in your home directory. When asked whether to initialize conda, enter yes. Close Terminal and open a new one. Check the result:

    conda --version

    A version number means conda is ready.

  3. Create the course environment

    Run this command. Type y and press Enter when asked to proceed.

    conda create -n ids-2026 python=3.12 numpy scipy pandas matplotlib seaborn scikit-learn statsmodels sympy openpyxl notebook ipykernel pip

    Activate it:

    conda activate ids-2026

    The prompt should show (ids-2026).

  4. Make a folder and open Jupyter Notebook

    Run these commands:

    mkdir -p ~/intro-data-science
    cd ~/intro-data-science
    jupyter notebook

    A browser page should open. If it does not, copy the full http://localhost:... address shown in Terminal and open it in your browser. In WSL, open that address in your Windows browser. Leave the terminal open while you work.

Ready? Go to Your first notebook and run the short test.
For everyone

Make your first notebook

  1. In the Jupyter browser page, click New → Python 3 (ipykernel) or New Notebook, then choose the Python kernel. You should see an empty code cell.
  2. Paste the code below into that code cell. Press Shift + Enter to run it.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy import stats

x = np.linspace(0, 2 * np.pi, 100)
plt.plot(x, np.sin(x))
plt.xlabel("x")
plt.ylabel("sin(x)")
plt.show()
print("pandas version:", pd.__version__)

You should see a sine curve and a pandas version number. This confirms that the main packages and the Jupyter kernel work.

  1. Rename the notebook to first-notebook.ipynb (click its title), then save with Ctrl + S on Windows/Linux or Command + S on macOS. Your notebook is in the course folder.
  2. When finished, save the notebook. In the terminal that started Jupyter, press Ctrl + C and confirm if asked. You can then close the terminal.
Next time: open Anaconda Prompt on Windows, or Terminal on macOS/Ubuntu. Run conda activate ids-2026, go to your course folder (cd /d "%USERPROFILE%\intro-data-science" on Windows; cd ~/intro-data-science on macOS/Ubuntu), then run jupyter notebook.
For everyone · Later in the course

Install another Python package

Use the same environment that runs your notebooks. First save your work and stop Jupyter with Ctrl + C in its terminal. Open Anaconda Prompt (Windows) or Terminal (macOS/Ubuntu) and activate your environment:

conda activate ids-2026

For example, to install plotly, run:

conda install plotly

For a different package, replace plotly with its installation name. Read the package’s official installation instructions if you are unsure of its name. If conda cannot find it in your current package source, you can try conda-forge:

conda install -c conda-forge plotly

If the package is available only through pip, use python -m pip after activating the course environment. Example:

python -m pip install plotly

Use one of these commands for a package; you do not need to run all three examples. Prefer conda when it has the package. After adding a package, start Jupyter again and restart the notebook kernel so it sees the new installation.

Check the environment: before installing, make sure the prompt starts with (ids-2026). Install packages in the terminal, not with !pip install in a notebook cell. If you have used pip and a later conda install proposes many unexpected changes, ask the instructor for help.
Quick help and sources

If something fails

ProblemWhat to try
conda is not recognized / command not foundClose and reopen Anaconda Prompt or Terminal. On Windows, use Anaconda Prompt, not a regular Command Prompt. Check that the installer finished.
jupyter is not recognized / command not foundRun conda activate ids-2026, then conda install notebook ipykernel and try again.
ModuleNotFoundError in a notebookCheck the notebook’s selected kernel. It must use ids-2026. Install the missing package in that environment and restart the kernel.
Jupyter browser page did not openCopy the entire local URL printed by Jupyter in the terminal; it may include a token and may use a port other than 8888.
Download or install failedCheck your internet connection and storage space; repeat the command. Share the full error message and your operating system with the instructor if it still fails.

Official instructions