Python Installation

Python Installation Before you can start writing Python code, you need to install Python on your computer. Python is available for Windows, Linux, and macOS. You can download the latest version from the official Python website. Check if Python is Already Installed Open your command prompt or terminal and run: Or: If Python is installed, […]

1 min read Lesson 17 of 43 40% through track

Python Installation

Before you can start writing Python code, you need to install Python on your computer.

Python is available for Windows, Linux, and macOS. You can download the latest version from the official Python website.

Check if Python is Already Installed

Open your command prompt or terminal and run:

python --version

Or:

python3 --version

If Python is installed, you will see the version number.

Example:

Python 3.13.5

Install Python on Windows

  1. Download Python from the official website.
  2. Run the installer.
  3. Select Add Python to PATH.
  4. Click Install Now.
  5. Wait for the installation to complete.

Verify the Installation

Open Command Prompt and run:

python --version

You should see the installed Python version.

Run Python

Start the Python interpreter:

python

Example:

>>> print("Hello World")
Hello World

Exit the interpreter:

>>> exit()

Python is now installed and ready to use.