Installing Python
How to install Python on Windows, Mac, or Linux and verify it works — in under 10 minutes.
"Setting up your environment is your first act of commitment. It says: I am serious about this."
— ShurAIStep 1 — Check if Python is Already Installed
Before installing anything, check whether Python 3 is already on your machine. Open your terminal and type:
python3 --version
If you see output like Python 3.11.2 — you already have Python 3 and can skip to Step 4. If you see an error or only Python 2, continue with Step 2.
Step 2 — Download Python
Go to python.org/downloads in your browser. The site automatically detects your operating system and shows the recommended download button. Click it to download the installer.
Python 2 is no longer maintained and must not be used for new projects. Always download and install Python 3 — the latest stable version shown on the download page.
Step 3 — Install Python
On Windows: Run the downloaded .exe file. On the very first screen, check the box that says "Add Python to PATH" — this is critical. Then click "Install Now".
On Mac: Run the downloaded .pkg file and follow the installation wizard. Python 3 will be installed to your system automatically.
On Ubuntu/Linux: Python 3 is often pre-installed. If not, run:
sudo apt update
sudo apt install python3 python3-pip -y
Step 4 — Verify the Installation
Open a new terminal window (important — use a fresh window after installing) and run:
python3 --version
# Should show: Python 3.x.x
pip3 --version
# Should show pip version — this is Python's package installer
If both commands return version numbers, your installation is successful.
Step 5 — Install a Code Editor
You write Python code in a text editor or IDE (Integrated Development Environment). The most popular free option is Visual Studio Code (VS Code) — download it from code.visualstudio.com.
After installing VS Code, open it and install the Python extension by Microsoft. This gives you syntax highlighting, error detection, and the ability to run Python files directly from the editor.
Python comes with a built-in editor called IDLE. It is simpler and already installed. For complete beginners it works fine. Search for "IDLE" in your applications after installing Python.
Step 6 — Run Your First Test
Create a new file called test.py, type the following line, and save it:
print("Python is installed and working!")
Open your terminal, navigate to the folder where you saved the file, and run it:
python3 test.py
If you see Python is installed and working! printed in the terminal — you are ready. Your Python environment is set up and you can move to the next lesson.
"Setting up is not the glamorous part. But it is the necessary first step every programmer has taken. You are already further along than you think."
— ShurAI🧠 Quick Check
When installing Python on Windows, what important option must you check during installation?