Python Tutorial
Lesson 02

Python Installation and Setup

Learn how to install Python and prepare your environment for writing and running Python programs.

Python Installation and Setup

Before writing Python programs, you need a Python environment where you can create and run your code.

Installing Python

Python can be installed on Windows, macOS and Linux. After installation, you can use the Python interpreter to execute Python programs.

Checking the Installation

After installing Python, you can check whether it is available by opening a terminal and running the Python version command.

Choosing an Editor

You can write Python programs using a simple text editor or an IDE such as Visual Studio Code. An editor makes it easier to create, organize and manage Python files.

Important Concepts

Installing Python
Python interpreter
Checking the Python version
Python files
Code editor

Practical Example

Check Your Python Installation

The following command can be used to check whether Python is installed and identify the installed Python version.

Code Example

Try the example below and understand how the program works.

Python
print("Python is ready!")

Run Code

Edit the code if you want, then click Run Code to execute it.

Python
Python Editor
Python runs directly in your browser.
Expected Output
Python is ready!

What You Learned

  • Why Python needs to be installed
  • What the Python interpreter does
  • How Python programs are executed
  • Why a code editor is useful