Install Python on your computer
15 min · Beginner
Need help? Ask a tutor on WhatsApp (opens in a new tab)Showing steps for Windows. They are marked “On Windows” below.
To run Python code on your computer, install the official Python 3 interpreter from python.org. The installer sets up Python, its standard library, and the pip package manager.
Download Python 3
Python 3 is the current major version of the language. Older Python 2 is no longer supported, so always install Python 3.
Download Python only from the official website: python.org. Always choose the latest stable Python 3 release.
- Go to
python.org/downloadsin your web browser. - The website automatically detects your operating system and offers the right installer.
- Click the Download Python 3.12 button to download the setup file.
Install on Windows or macOS
Run the installer. One checkbox on Windows is critical for a smooth setup.
On Windows
On Windows, open the downloaded .exe installer.
- Important: Check the box at the bottom that says Add python.exe to PATH.
- Click Install Now.
- Wait for the installation to finish, then click Close.
python from any Command Prompt or PowerShell window.Verify in your terminal
A terminal is a text window where you type commands and see the replies. You use it to check Python and run programs.
After installing, open your terminal to confirm that Python is ready.
python --versionPython 3.12.0
If you see a version number like Python 3.12.x, Python is ready. On some macOS or Linux systems, the command is python3 --version.
Example
python --versionpip --versionPython 3.12.0 pip 24.0
What this code does
- Type each command in your Command Prompt or Terminal and press Enter.
python --versiondisplays the installed Python interpreter version.pip --versionconfirms that the package installer is installed and ready.
Next step
Check your understanding
5 quick questions