Installing Python and Setting Up Your Environment

Before writing real programs, we must install Python on our computer. Without installing Python, we cannot run Python code.



1. What is Installation?

Installation means putting software into your computer so that it can work properly. Just like we install apps in mobile, we install Python to start programming.


2. Why Do We Need to Install Python?

  • To run Python programs
  • To use Python interpreter
  • To connect our code with the system

Without installation, the computer will not understand Python language.


3. What is Python Interpreter?

Python interpreter reads your code line by line and executes it. That is why Python is called an interpreted language.


4. How to Install Python (Windows)

  1. Open browser (Edge or Chrome)
  2. Go to https://www.python.org
  3. Click Downloads
  4. Click Download Python (latest version)
  5. Open downloaded file
  6. Important: Tick "Add Python to PATH"
  7. Click Install Now
Important Tip: Always tick "Add Python to PATH" before installing.

5. Check if Python is Installed

Open Command Prompt and type:

python --version

If installed correctly, you will see something like:

Python 3.12.0

6. Running Your First Program

Open Command Prompt and type:

python

You will see:

>>>

Now type:

print("Hello Python")

Output:

Hello Python

7. Using Code Editor (Recommended)

Instead of writing code in command prompt, we use code editor. Popular editors:

  • VS Code (Recommended)
  • PyCharm
  • Notepad++
  • Sublime Text

8. Creating Your First Python File

  1. Open VS Code
  2. Click File → New File
  3. Save as hello.py
  4. Write the following code:
print("Welcome to Python Zero to Hero")

Right click and choose Run Python File.


9. Command Prompt vs Code Editor

Command Prompt

  • Good for quick testing
  • Very basic
  • Not professional

Code Editor

  • Better for projects
  • Auto suggestions
  • Error highlighting
  • Professional

10. Common Beginner Mistakes

  • Forgetting to tick "Add to PATH"
  • Saving file without .py extension
  • Installing outdated version
  • Writing code in Word document

Conclusion

Now your system is ready for Python programming. You learned how to install Python, check installation, and run your first program.

In the next article, we will write a complete Python program and understand how Python executes code step by step.

Your Zero to Hero journey continues.

Chakrapani U

Hi, I’m Chakrapani Upadhyaya, an IT professional with 15+ years of industry experience. Over the years, I have worked on web development, enterprise applications, database systems, and cloud-based solutions. Through this blog, I aim to simplify complex technical concepts and help learners grow from beginners to confident, industry-ready developers.

Previous Post Next Post

نموذج الاتصال