Set up Python

About 15 minutes. Do it before the session if you can; we’ll also do it together at the start.

NoteStuck? Colab is the backup

We do the install together at the start of the session. Around 9:30, if your notebook still won’t run, switch to Google Colab (step 10) and keep going. A helper will finish your install at the break or during practice time.

Watch it first: the whole setup in under two minutes

1. Open a terminal

A terminal is a window where you type commands instead of clicking.

Press Cmd-Space, type Terminal, and press Enter.

Press the Win key, type PowerShell, and press Enter. Your prompt starts with PS C:\.

2. Install uv

uv is one small tool that installs Python and the packages you need. It needs no admin rights. Copy the line for your computer, paste it into the terminal, and press Enter.

curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

3. Check it worked

Close the terminal and open a new one, so it can find uv. Then run:

uv --version

You should see a version number, like uv 0.13.3.

4. Make your project folder

uv init --python 3.13 --vcs none --no-package dss-python
cd dss-python

The folder is made in your home folder: /Users/<you>/dss-python on a Mac, C:\Users\<you>\dss-python on Windows. uv puts three starter files in it, pyproject.toml, main.py and README.md. Leave them alone.

  • --python 3.13 matches the Python that Colab uses, so code behaves the same in both places.
  • --vcs none skips git, so a Mac without Apple’s developer tools doesn’t ask to install them.
  • --no-package keeps it a plain folder for notebooks and scripts, not a Python package to publish.

5. Add JupyterLab and matplotlib

uv add jupyterlab matplotlib

uv downloads Python 3.13, JupyterLab and matplotlib into one environment, a hidden .venv folder inside dss-python. JupyterLab, its Python and matplotlib all live there, so the bar plot just works.

This is the slow step, especially on shared Wi-Fi. It’s done when your prompt comes back. Download the notebook (step 6) while you wait.

6. Download the notebook

Your browser saves them in your Downloads folder.

Run one of these inside dss-python, once step 5 has finished (or in a second terminal window). The notebook lands in your project folder, so you can skip dragging it in (step 7).

curl -LO https://ncsu-libraries.github.io/dsti-python/notebooks/introduction-to-programming-with-python.ipynb

Type curl.exe, with the .exe. Plain curl in PowerShell is a different tool.

curl.exe -LO https://ncsu-libraries.github.io/dsti-python/notebooks/introduction-to-programming-with-python.ipynb

7. Start JupyterLab and open the notebook

Once step 5 is finished, run this in dss-python:

uv run jupyter lab

Your browser opens JupyterLab. Leave the terminal open. It’s running JupyterLab.

  1. Open your Downloads folder, and drag the notebook onto JupyterLab’s file list in the left sidebar. Or click the Upload button (↑) above the file list, and choose the file.
  2. Double-click the notebook to open it.
  3. Scroll to 1. Python and JupyterLab. Click the bar plot cell under Example: a simple bar plot, and press Shift-Enter.

A chart means it all works: Python, JupyterLab and matplotlib. No chart by about 9:30? Flag a helper, or switch to Colab (step 10) and keep going.

8. Stop, and start again later

Save your work with .

To stop JupyterLab, go back to the terminal and press Ctrl-C twice.

Next time, open a terminal and run:

cd dss-python
uv run jupyter lab

Then double-click your notebook in the file list.

9. Alternative: conda

Already use Anaconda, Miniconda or Miniforge? Use these commands instead of steps 2 to 5. We show uv in the room, but helpers can still help you with conda.

Open Terminal: press Cmd-Space, type Terminal, and press Enter.

Open Anaconda Prompt or Miniforge Prompt from the Start menu. Plain PowerShell usually doesn’t know conda.

conda create -y -n dss-python -c conda-forge --override-channels python=3.13 jupyterlab matplotlib
conda activate dss-python
mkdir dss-python
cd dss-python
jupyter lab
  • The first command is one long line. Use the copy button.
  • -c conda-forge --override-channels uses only the conda-forge channel. It skips Anaconda’s default channel, so conda won’t ask you to accept its Terms of Service.
  • python=3.13 matches uv and Colab.
  • The conda download is bigger and slower than uv’s. Start it early.

The last command opens JupyterLab. Now download the notebook (step 6), drag it into the file list, double-click it, and run the bar plot cell (step 7). Skip the uv run jupyter lab command: JupyterLab is already running.

Next time, in the same kind of terminal:

conda activate dss-python
cd dss-python
jupyter lab

To add a package, with dss-python active:

conda install -c conda-forge --override-channels polars

No conda yet? We suggest uv, so use steps 2 to 5. If you want conda anyway, Miniforge has a Mac installer (.pkg) and a Windows installer (.exe).

10. Backup: Google Colab

Colab runs in your browser, so there’s nothing to install. Use it if your install is stuck, or on a Chromebook or tablet.

  1. Open the learner notebook in Colab.
  2. Sign in with your Google account.
  3. Click Copy to Drive in the toolbar.
  4. Work in the new tab, titled Copy of introduction-to-programming-with-python.ipynb.

A “not authored by Google” warning means you’re in the original tab. Switch to your copy.

Move your Colab work to your laptop

Haven’t installed Python yet? Do steps 1 to 5 first. Then, in Colab, choose File → Download → Download .ipynb. Start JupyterLab as in step 7 and drag the file into its file list.

If something goes wrong

What you see What to do
uv: command not found Open a new terminal. Still missing on a Mac? Run source $HOME/.local/bin/env.
“running scripts is disabled” (Windows) Use the exact command shown above, with -ExecutionPolicy ByPass.
Antivirus or SmartScreen blocks the install Flag a helper, or ask at go.ncsu.edu/getdatahelp.
Mac “command line developer tools” prompt Click Not Now. You don’t need them.
The download is slow Keep going in Colab (step 10). You can finish the install during the break.
The browser didn’t open Copy the http://localhost:… link from the terminal and paste it into your browser.
The notebook isn’t in JupyterLab’s file list Drag it in again, and check you started JupyterLab inside dss-python.
ModuleNotFoundError: No module named 'matplotlib' This JupyterLab isn’t your project’s. Press Ctrl-C twice, then run cd dss-python, then uv run jupyter lab (with uv run).
Failed to spawn: `jupyter` Run uv add jupyterlab matplotlib in dss-python first.
A file named …(1).ipynb It’s a second download. Use either one.
Chromebook or tablet Use the Colab backup (step 10).
conda: command not found (or “not recognized”) On Windows, use Anaconda Prompt or Miniforge Prompt. On a Mac, open a new terminal.
conda asks you to accept Terms of Service Use the exact command shown in step 9, with -c conda-forge --override-channels.

Checked with uv 0.13.3 on October 20, 2026. uv changes often; if a screen looks different, the official install page wins.