# Installation

On most systems you can end up with multiple versions of Python installed and this can be confusing. We're going to set it up once so that we're using the latest version (3.10 or 3.11 at the time of this writing) and only that version.

You cannot avoid having multiple versions of Python installed because older Macs and Linux distributions come with version 2.7 installed by default so you might see this:

```
$ python --version
Python 2.7.16
```

It's important to note that **Python 2.x is a really really old version of Python**, more than 10 years old. You never want to use it and most of what we're writing won't work in Python 2.7.

#### Install Python 3:

Homebrew will install 3.10 by default instead of 3.11, this is fine.

```
brew install python3
which python3
python3 --version
```

On Ubuntu, you should already have a reasonably recent version of Python installed. Check your version with:

```
python3 --version
```

#### Set Up the `python` Alias

Open your shell's configuration file, for `zsh`:

```
code ~/.zshrc
```

and paste this at the bottom:

```
alias python=python3
```

Close your terminal window and open a new one. In any new terminal window from this point you can now just type `python` instead of `python3`.

```
which python
python --version
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ga0-2.gitbook.io/seifxr10anz-content/week-7/day-1-intro-to-python/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
