🐍 Python Setup Guide¶
This guide will help you install Python on your computer.
Step 1: Check if Python is Already Installed¶
Open your terminal/command prompt and type:
or
If you see something like Python 3.11.5, you're already set! Skip to 02_running_code.md.
Step 2: Download Python¶
🪟 Windows¶
- Go to python.org/downloads
- Click the big yellow "Download Python 3.x.x" button
- Run the installer
- IMPORTANT: Check the box that says "Add Python to PATH"
- Click "Install Now"
🍎 macOS¶
Option A: Official Installer
1. Go to python.org/downloads
2. Download the macOS installer
3. Run the .pkg file and follow the prompts
Option B: Using Homebrew (recommended if you have Homebrew)
🐧 Linux¶
Most Linux distributions come with Python. If not:
Ubuntu/Debian:
Fedora:
Step 3: Verify Installation¶
Open a new terminal window and run:
You should see:
Also verify pip (Python's package manager):
Step 4: Choose a Code Editor¶
You'll need a place to write your code. Here are great options:
VS Code (Recommended for Beginners)¶
- Free and powerful
- Great Python support
- Download: code.visualstudio.com
- Install the "Python" extension after installing VS Code
PyCharm Community Edition¶
- Free version available
- Specifically designed for Python
- Download: jetbrains.com/pycharm
Other Options¶
- Sublime Text — Lightweight and fast
- Atom — Free and customizable
- IDLE — Comes with Python (basic but sufficient to start)
Step 5: Test Your Setup¶
Create a file called hello.py with this content:
Run it:
You should see:
Troubleshooting¶
"python" command not found¶
- Windows: Reinstall Python and make sure "Add to PATH" is checked
- macOS/Linux: Try
python3instead ofpython
Permission denied¶
- macOS/Linux: You may need
sudofor installation - Windows: Run the installer as Administrator
Old Python version¶
- Make sure you downloaded Python 3.x (not Python 2.x)
- Python 2 is outdated and not recommended
✅ Ready?¶
Once Python is installed and working, move on to 02_running_code.md to learn different ways to run your code!