Welcome to Day 2 of the 100 Days of Python series!
Today, we’re going to install Python, set up the right tools, and prepare your system for coding success — whether you're on Windows, macOS, or Linux.
✅ Step 1: Check if Python Is Already Installed
Before installing anything, open your terminal or command prompt and run:
python --version
or
python3 --version
If you see something like Python 3.x.x
, you’re good to go! Otherwise, follow the instructions below.
💻 Installing Python (Latest Stable Version)
🔹 For Windows:
- Go to the official site: https://python.org
- Download the latest Python 3.x installer.
- IMPORTANT: During installation, check the box that says:
✅ Add Python to PATH
- After installation, verify with:
python --version
🔹 For macOS:
Python 2.x comes pre-installed, but you’ll want the latest 3.x version.
- Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Then install Python:
brew install python
🔹 For Linux (Debian/Ubuntu):
sudo apt update
sudo apt install python3 python3-pip
🧪 Step 2: Verify Installation
Run this in your terminal:
python --version
# or
python3 --version
You should see output like:
Python 3.12.0
Also check if pip
is working:
pip --version
🖥️ Step 3: Choose a Code Editor
Pick an editor that suits your style. Here are the most popular ones:
✅ Recommended: VS Code
- Lightweight, fast, and feature-rich
- Great Python support via extensions
- Download from: https://code.visualstudio.com
Other Options:
- PyCharm – Full IDE, great for large projects
- Sublime Text – Fast and minimal
- Jupyter Notebook – Excellent for data science
⚙️ Step 4: Install Python Extension (VS Code)
If you're using VS Code:
- Open VS Code
- Go to the Extensions tab (or press
Ctrl+Shift+X
) - Search for
Python
and install the official one from Microsoft
🧪 Step 5: Run Your First Python File
- Open VS Code
- Create a new file:
hello.py
- Add this code:
print("Hello, Python World!")
- Run it using the terminal:
python hello.py
You should see:
Hello, Python World!
🎉 You just wrote your first Python program!
🧼 Optional: Set Up Virtual Environments
Virtual environments keep your project dependencies isolated.
Create one like this:
python -m venv venv
Activate it:
-
Windows:
venv\Scripts\activate
-
macOS/Linux:
source venv/bin/activate
Deactivate with:
deactivate
🧠 Recap
- ✅ Installed Python
- ✅ Set up code editor (VS Code recommended)
- ✅ Wrote and ran your first script
- ✅ Learned about virtual environments
Top comments (0)