Before diving into the world of Python programming, the first step is to install Python on your computer.
This blog will guide you through the installation process, covering different operating systems and common installation methods.
Installing Python on Window:
Download Python: Visit the official Python website (python.org) and navigate to the Downloads section. Choose the latest Python version compatible with your Windows version (e.g., Python 3.12.3 for Windows 10).
Link - https://www.python.org/
Run the Installer: Once the download completes, double-click the installer file (e.g., python-3.12.3.exe) to launch the Python installer.
Customize Installation: In the installer, you can customize the installation options. Ensure that the "Add Python to PATH" option is checked, as it allows you to run Python from the command line easily.
Install Python: Click on the "Install Now" button to begin the installation process. Python will be installed in the default location (usually C:\Python).
Verify Installation: After installation, open Command Prompt and type
python --version
orpython -V
to check if Python is installed correctly. You should see the installed Python version (e.g., Python 3.12.3).python --version
python -V
Python 3.12.1
Installing Python on macOS:
Using Homebrew (Recommended): Open Terminal and install Homebrew if you haven't already. Then, run the command
brew install python
to install Python using Homebrew.brew install python
Download from Python Website: Alternatively, you can download the macOS installer from python.org. Choose the macOS installer for the desired Python version and follow the on-screen instructions.
Verify Installation: After installation, open Terminal and type
python3 --version
to verify that Python is installed. You should see the installed Python version (e.g., Python 3.12.3).python3 --version
Installing Python on Linux (Ubuntu/Debian):
Using Package Manager: Open Terminal and run the command
sudo apt update
to update package lists. Then, install Python 3 withsudo apt install python3
.sudo apt update
sudo apt install python3
Verify Installation: After installation, type
python3 --version
in Terminal to check the installed Python version (e.g., Python 3.10.1).python3 --version
You can support me by buying me a coffee ☕