🚀 How to Set Up a Python Development Environment (VS Code + Git)

So, you’ve decided to learn Python—great choice! 🎉 Now, let’s set up a proper coding environment to write, test, and manage Python projects efficiently.

Today, we’ll cover:
✅ Installing Python
✅ Setting up VS Code for Python
✅ Installing Git for version control
✅ Running your first Python script

Let’s get started!🚀

1️⃣ Install Python

First, you need to install Python on your system.

🔹 Download Python from the official site:
👉 Python Official Download

🔹 For Windows:

  1. Download and run the installer.

  2. Check "Add Python to PATH" before clicking "Install".

  3. Open Command Prompt and type:

python --version

If it shows the Python version, you’re good to go! ✅

🔹 For Mac/Linux:

Use Homebrew on Mac:

brew install python3

On Linux (Debian/Ubuntu):

sudo apt install python3

2️⃣ Install VS Code (Visual Studio Code)

Why VS Code?
✔️ Lightweight & Fast
✔️ Supports Python Extensions
✔️ Built-in Terminal & Git Support

🔹 Download & install VS Code:
👉 VS Code Official Site

🔹 Set Up Python in VS Code:

  1. Open VS Code and install the Python Extension

  2. Press Ctrl + Shift + P → Type Python: Select Interpreter → Choose Python 3.x

  3. Open a folder, create a .py file, and start coding!

3️⃣ Install & Set Up Git for Version Control

Version control helps you track changes in your code. Git is the most popular tool for this!

🔹 Download Git:
👉 Git Official Site

🔹 Basic Git Setup (After Installation)
Open a terminal and set up your identity:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

🔹 Check if Git is Installed:

git --version

If you see the version number, Git is ready! ✅

4️⃣ Run Your First Python Script

Now, let’s write and run your first Python script in VS Code.

🔹 Open VS Code, create a file named hello.py
🔹 Write this simple code:

print("Hello, World! Welcome to Python Development!")

🔹 Run the script by clicking Run ▶️ or using the terminal:

python hello.py

Congrats! 🎉 You’ve successfully set up Python, VS Code, and Git!