# Getting Started

Everything to set up your computer and your course repository, in order. Each step needs only the one above it. Work through it at your own pace, stop wherever something breaks, and bring the error to class or to office hours.

Steps 4 to 13 take most people 30 to 45 minutes the first time. [Starting a project](/guides/python-projects/#starting-a-project) begins where this page ends, so all of it has to be working first.

## What you end up with

- A repository named after this course on GitHub, with your name in its README
- The same folder on your own computer, in a place you can find again
- Python 3.14 running on your machine
- A file called `hello.py` that prints something when you run it

## 1. Read the syllabus

Start with [the syllabus](/syllabus/). It covers how grading works, what is due when, the late policy, and how AI fits into this course, which is a longer answer here than in most courses. Reading it takes 10 minutes and saves an argument in November.

## 2. Your Babson AI key

**You do not request it.** Babson's AI team emails you one, at no cost. Keep that email, because you need it to set the key up. [Your AI Tools and Babson Key](/guides/babson-ai-key/) has every step.

## 3. Have a GitHub account

**If you already have one, use it.** An account with history on it is worth more than a clean one.

If you are creating one, sign up at [github.com](https://github.com/) with your Babson email, and pick a username you would not mind a future employer reading. Your work in this course is published under it.

## 4. Install the tools

Install these in this order. None of them asks you to choose anything.

1. [Visual Studio Code](https://code.visualstudio.com/), where you run commands and see your files
2. [Git](https://git-scm.com/downloads)
3. [GitHub Desktop](https://desktop.github.com/), which saves and publishes your work, and which holds your course folder so you never have to hunt for it
4. [uv](https://docs.astral.sh/uv/getting-started/installation/), which installs Python and runs it. uv has no installer to double click. You paste a line into a terminal, and step 5 is that line.

**Do not install Anaconda.** If you already have it, leave it installed and do not use it for this course. The [Python environments guide](/guides/python-environments/) explains why.

## 5. Install uv and Python

Open a terminal first.

- **Windows**: press the Start key, type `powershell`, open Windows PowerShell
- **macOS**: press Command and Space, type `terminal`, open Terminal

Paste the line for your system and press Enter. It installs uv, installs Python 3.14, and prints the Python version when it is done.

**macOS:**

```
curl -LsSf https://astral.sh/uv/install.sh | sh && . "$HOME/.local/bin/env" && uv python install 3.14 --default --preview-features python-install-default && python --version
```

**Windows:**

```
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"; $env:Path = "$HOME\.local\bin;$env:Path"; uv python install 3.14 --default --preview-features python-install-default; python --version
```

**You are done when the last line reads `Python 3.14.something`.** That line means uv is installed, Python 3.14 is installed, and your terminal can find both.

### Why the version is spelled out

Your machine probably has a Python already. A Mac ships one, and it is old: 3.9, from 2020. uv prefers a Python that is already on the machine over downloading a newer one, so without this step you would silently get the old one, and so would nobody else in the class. Installing 3.14 and marking it the default puts everybody on the same Python.

### When this step fails

- **You are asked for a password.** First, so you are not stuck: a terminal shows nothing at all while you type a password. No dots, no moving cursor. Your keyboard is fine. Type it and press Enter. Then fix the cause, because you should not have been asked: uv installs into your own home folder and never needs administrator rights, so a prompt means the word `sudo` got into the command. Take it out and paste the line again.
- **`uv` or `python` is not found**, as `command not found` or `is not recognized`. Close the terminal window, open a new one, and run `python --version` again. A terminal reads the list of installed programs when it opens, so one that was already open does not know about a program installed since.
- **macOS warns that `.local/bin` is not on your PATH.** The line above already handles this for the terminal you are in. A new terminal will have it too.
- **`python --version` prints 3.9, or anything other than 3.14.** Something else on your machine is answering to `python` first. Bring it to class with the output of `uv python list`.

## 6. Set up GitHub Desktop

Do this before you make a repository. A commit made while Git does not know who you are belongs to nobody, and fixing it afterwards is harder than doing it now.

1. Open GitHub Desktop
2. Open **File → Options** on Windows, or **GitHub Desktop → Settings** on macOS
3. Under **Accounts**, sign in to GitHub.com with the account from step 3
4. Under **Integrations**, set the external editor to **Visual Studio Code**, and the shell to **PowerShell** on Windows or **Terminal** on macOS
5. Under **Git**, check that your name and email are filled in

## 7. Create the repository

In GitHub Desktop, choose **File → New repository**.

Fill it in exactly like this:

| Field | What to put |
|---|---|
| Name | Your course code in lowercase: `oim7510` or `oim6301` |
| Description | `Coursework for OIM7510`, or `Coursework for OIM6301` |
| Local path | **A `GitHub` folder in your home folder**, as the note under this table describes |
| Initialize with a README | Checked |
| Git ignore | `Python` |
| License | None |

Then click **Create repository**.

**Put the repository in a `GitHub` folder in your home folder.** Click **Choose...** next to **Local path**, open your home folder, make a new folder called `GitHub`, and choose it. Your home folder is `C:\Users\<your-name>` on Windows and `/Users/<your-name>` on macOS, where `Cmd+Shift+H` jumps to it. GitHub Desktop suggests `Documents/GitHub`, but on many computers OneDrive or iCloud Drive syncs the Documents folder without telling you, and those programs can delete or lock files while your code runs. GitHub Desktop's **Open in Visual Studio Code** button takes you back to the repository every time, so you never have to remember where it is.

## 8. Publish it

The repository exists on your computer now and GitHub cannot see it yet.

1. Click **Publish repository**
2. **Uncheck "Keep this code private"**
3. Leave the organization field alone. It publishes to your own account.
4. Click **Publish repository**

Then click **View on GitHub**. Your browser opens `https://github.com/<your-github-username>/<course-code>`.

**If you left it private by accident**, open the repository on GitHub, go to **Settings**, scroll to the bottom, and change the visibility to public. The course website reads your repository, and a private one is invisible to it.

## 9. Write something and push it

1. In GitHub Desktop, click **Open in Visual Studio Code**
2. In VS Code's file list on the left, click `README.md`
3. Type your name into it
4. Save the file with Control and S, or Command and S on macOS

A dot on the file's tab in VS Code means the file has changes you have not saved. Saving clears it.

Now go back to GitHub Desktop. Your change appears in the left column.

5. In the **Summary** box at the bottom left, type `add name to readme`
6. Click **Commit to main**
7. Click **Push origin** at the top

Click **View on GitHub** again. Your commit message and your name are both on the page.

That message is called a commit message and it describes what changed. You write one every time.

## 10. Make the notebooks folder

Back in VS Code, in the file list on the left, click the **New Folder** button and name it `notebooks`. Put your notebooks here for the rest of the term.

The folder stays empty for now, and Git does not track an empty folder, so it will not appear on GitHub until there is a file in it.

## 11. Replace the .gitignore

Step 7 had you set **Git ignore: Python**, which is GitHub's generic template. Swap it for the one this course uses.

1. Open **[.gitignore for your course repository](/downloads/view/gitignore-for-your-repo/)** and click **Copy the text**
2. In VS Code's file list, click `.gitignore` in the **root folder** of your repository, beside `README.md`, to open it
3. Select everything in the file with `Ctrl+A` (Windows) or `Cmd+A` (macOS), paste over it with `Ctrl+V` (Windows) or `Cmd+V` (macOS), and save with `Ctrl+S` (Windows) or `Cmd+S` (macOS)
4. In GitHub Desktop, write `use the course gitignore` in the **Summary** box, click **Commit to main**, then **Push origin**

A `.gitignore` lists what git leaves out of your commits. The course file is GitHub's current Python template with one line added at the end, `.DS_Store`, for the file macOS writes into every folder.

**Why replace it.** GitHub Desktop offers an older copy of GitHub's template, from before marimo's line was added, so it does not list `__marimo__/`. marimo writes every cell's output into `__marimo__/session/`, as one large file per notebook that changes while you work. Left unlisted, it lands in your repository and turns every commit into noise, and it carries whatever your cells printed.

**Folder names to avoid.** The template leaves out any folder called `build`, `dist`, `downloads` or `lib`, wherever it sits, so git never commits what you put in one. Do not give your own folders these names.

## 12. Open a terminal inside VS Code

VS Code has a terminal built into it, which saves switching windows and starts you in the right folder.

Choose **View → Terminal**. A panel opens at the bottom, already pointing at your course folder.

Python is already installed from step 5, so there is nothing to download here.

## 13. Run Python

**In the terminal directly.** Run:

```
uv run python
```

Check the first line it prints. It should read `Python 3.14.something`. The prompt then changes to `>>>`, which means Python is now reading what you type. Try these:

```
1 + 2
print("hi")
```

To leave, type `exit()` and press Enter. The `>>>` goes away.

**From a file.** In VS Code, make a folder named `scripts` in your course folder, and in it a new file called `hello.py`. Put one line in it:

```python
print("hello world")
```

Save it, then run:

```
uv run python scripts/hello.py
```

`hello world` appears in the terminal.

### When `python` on its own does not work

`uv run python` finds an interpreter for you, so it works even when the second half of step 5 never ran. Typing `python` on its own needs that step, and if you installed uv separately or already had it, you have not run it. Check with:

```
python --version
```

If that prints an older version, `command not found`, or `is not recognized`, run this and then open a new terminal:

```
uv python install 3.14 --default --preview-features python-install-default
```

### Colored text in the terminal

Terminals color things for their own reasons and PowerShell in particular will gray out or color text it is predicting for you. Color on its own is not an error. What matters is whether the words say `Error` or `Traceback`, and whether `hello world` appeared.

## 14. Commit what you made

Go back to GitHub Desktop. `hello.py` is waiting there.

1. Summary: `add hello.py`
2. **Commit to main**
3. **Push origin**

## Where your work lives

Every week, commit what you built in class before you leave, so your repository holds all of it. What each assignment asks you to submit is on its Canvas assignment.

## When it does not work

Bring the error itself. Select the text in the terminal, copy it, and paste it into an email or into class. A screenshot works too. A description such as "it says an error" almost never works, because the message is the part that says which of about twenty things happened.

The most common causes, in order:

1. A program installed while VS Code was already open. Quit VS Code completely and open it again. [The Terminal](/guides/terminal/) explains why closing the terminal panel is not enough.
2. A step done out of order. Start again at the step above the one that failed.

### Files a check cannot find

When a comment on your work says a file is missing and you know you made it, look for these first:

1. **The file is in the wrong folder.** The root folder is the outermost folder of your repository, `oim7510` or `oim6301`, where `README.md` sits, and never a folder named `root`. One folder too deep is wrong as well: `scripts/scripts/bmi.py` is a different path from `scripts/bmi.py`, and `notebooks/projects/mp1/` from `projects/mp1/`. [Where files go](/guides/python-projects/#where-files-go) lists the folder for each kind of file.
2. **The name is close but not exact.** Copy the name from the task letter for letter, capitals included: `AGENTS.md` takes capitals and `projects` does not. `loan-schedule.py.py` and a copy ending in `(1)` are different names. Check the names your agent chose as well.
3. **A rename that changes only capitals never reached GitHub.** Windows and macOS treat `Agents.md` and `AGENTS.md` as one file, so git sees nothing to commit. Rename it to another name and commit, then to the right name and commit again.
4. **A placeholder is still in the file.** Replace all of `<your-github-username>`, the angle brackets too, so that only your username is left. A starter line you were meant to replace, or a `TODO` your agent left, counts as not written while it is still there.
5. **The commit is on your computer and not on GitHub.** Open the repository on github.com and click the file itself. Your commit message at the top of the page shows only that a commit arrived, and the file may not be in it. Commit and push from GitHub Desktop, because **Add files via upload** on github.com skips the copy on your computer and can block your next push.

### Check yourself

A task asks for `projects/mp1/loan-schedule.py`. Your agent saved the notebook as `notebooks/Projects/mp1/loan-schedule.py.py`. Find each difference.

<details>
<summary>Answer</summary>

`projects` belongs in the root folder, beside `notebooks`, and here it is inside `notebooks`. `Projects` has a capital P. The file name ends in `.py` twice.

</details>

## Then what

Your repository now has a README with your name and a `hello.py` that runs, both pushed.

Next, turn that repository into a Python project and set up your agent. [Starting a project](/guides/python-projects/#starting-a-project) and [Your AI Tools and Babson Key](/guides/babson-ai-key/) are the written steps for both.

How the work is actually done, including how to work with the agent and what to do when a number surprises you, is in the [AI guide](/policies/ai/). Read it once before you start working with the agent.
