How to Use Python on Windows for Vibe Coding with AI

A step-by-step guide for hobbyist programmers — including how to use the Python IDE (IDLE)


Part 1: Installing Python on Windows

Step 1: Download Python

  1. Open your browser and go to python.org/downloads
  2. Click the yellow “Download Python” button (it will detect Windows and suggest the latest version)
  3. Wait for the installer to download (e.g., python-3.12.x.exe)

Step 2: Install Python (Critical: Check the Box!)

  1. BEFORE clicking anything else — check the box at the bottom that says:

“Add Python to PATH”

This is essential. Without it, your computer won’t know where Python lives.

  1. Click “Install Now” (not “Customize installation” unless you know what you’re doing)
  2. Wait for the progress bar to finish. You’ll see “Setup was successful.”
  3. Click “Close”

Step 3: Verify Installation

  1. Press Windows + R, type cmd, and press Enter (or search for “Command Prompt” in Start)
  2. In the black window that appears, type:
   python --version
  1. You should see something like: Python 3.12.2
  2. Also test pip (Python’s package installer):
   pip --version
  1. If both work, you’re ready!

Part 2: Setting Up Your Vibe Coding Environment

You have several options. Choose the one that matches your vibe.

OptionBest forDifficulty
A: Python’s Built-in IDE (IDLE)Beginners, quick testing, learningVery Easy
B: VS CodeSerious hobbyists, larger projectsEasy
C: Simple Text EditorMinimalists, tiny scriptsModerate

Option A: Using Python’s Built-in IDE (IDLE) — RECOMMENDED FOR VIBE CODING

What is IDLE?

IDLE (Integrated Development and Learning Environment) comes automatically with Python on Windows. It’s a simple, friendly editor where you can write, run, and test code all in one window. Perfect for vibe coding because it’s lightweight and immediate.

How to Open IDLE

Method 1: Start Menu

  1. Click the Windows Start button
  2. Type IDLE or Python
  3. Click on “IDLE (Python 3.xx 64-bit)”
  4. A window opens with >>> prompts — that’s the Python shell

Method 2: Right-click any .py file

  1. Find any Python file (or save one as .py)
  2. Right-click it
  3. Choose “Edit with IDLE”

IDLE’s Two Modes (Both Useful for Vibe Coding)

Mode 1: Interactive Shell (Instant Testing)

  • Type Python code directly after the >>> prompt
  • Press Enter — it runs immediately
  • Great for: testing small snippets from your AI

Example vibe session:

>>> import random
>>> random.choice(["cat", "dog", "dragon"])
'dragon'
>>> 5 + 3 * 2
11

Mode 2: Editor Window (Save and Run Scripts)

  1. In IDLE, click File → New File (or press Ctrl+N)
  2. A blank editor window opens
  3. Paste your AI-generated code here
  4. Save it: File → Save (or Ctrl+S) — name it something.py
  5. Run it: Run → Run Module (or press F5)

Why IDLE is Great for Vibe Coding

FeatureHow It Helps
No setup requiredComes with Python — already installed
Color highlightingKeywords, strings, and functions appear in different colors automatically
One-click runPress F5 and your code runs in the same window
Error traceback shows clickable linesDouble-click an error and it jumps to that line in your code
Built-in debuggerStep through your AI’s code to understand it
Auto-indentationIDLE adds spaces for you — fixes common AI code formatting issues

Complete Vibe Workflow with IDLE

┌────────────────────────────────────────────────────┐
│ │
│ 1. Ask AI for code (in your browser) │
│ ↓ │
│ 2. Copy the code (Ctrl+C) │
│ ↓ │
│ 3. Open IDLE → File → New File (Ctrl+N) │
│ ↓ │
│ 4. Paste code (Ctrl+V) into the editor │
│ ↓ │
│ 5. Save: File → Save → name_it.py │
│ ↓ │
│ 6. Run: Run → Run Module (F5) │
│ ↓ │
│ 7. See output in the IDLE shell window │
│ ↓ │
│ 8. If error: copy error text, paste back to AI │
│ ↓ │
│ 9. Paste AI's fix into IDLE, save, run again │
│ ↓ │
│ 10. Experiment: change numbers, add print() calls │
│ │
└────────────────────────────────────────────────────┘

IDLE Pro Tips for Vibe Coders

Quick test a function without saving:

  • Copy a function from AI, paste directly into >>> prompt, press Enter twice
  • Then call it: my_function("test")

Restart the shell without closing:

  • Press Ctrl+F6 or go to Shell → Restart Shell
  • Clears variables but keeps your editor open

See all variables you’ve created:

  • Type dir() at the >>> prompt

Auto-complete while typing:

  • Press Tab after typing part of a word — IDLE suggests completions

Find which line has an error:

  • When code crashes, the last line before SyntaxError shows the line number
  • Or double-click the error in red text — IDLE jumps to that line

Option B: VS Code (For Larger Projects)

Setting Up VS Code

  1. Download from code.visualstudio.com
  2. Run the installer (check “Add to PATH” during installation)
  3. Open VS Code, go to Extensions (Ctrl+Shift+X)
  4. Search and install:
  • Python (by Microsoft)
  • Code Runner (optional – one-click run)

Running Code in VS Code

  1. Open your .py file
  2. Click the triangle “Run” button (top right)
  3. Or press Ctrl+F5
  4. Output appears in a terminal at the bottom

VS Code vs IDLE for Vibe Coding

AspectIDLEVS Code
Learning curveNoneGentle
Startup timeInstant2-3 seconds
AI integrationNoneGitHub Copilot (paid) or Continue (free)
Best forQuick tests, learning, small scriptsMulti-file projects, advanced debugging

Option C: Simple Text Editor + Command Prompt

Setup

  • Use Notepad (built-in) or Notepad++ (free)
  • Save files as .py
  • Run via Command Prompt

Running Code

cd Desktop\VibeCode
python my_script.py

See Part 4 in previous section for details


Part 3: Getting Code from Your AI Chatbot

The Vibe Workflow (Works with Any Editor)

Step 1: Ask the AI for Python code

In your AI chatbot (ChatGPT, Claude, etc.), type something like:

“Write a Python script that asks for my name and age, then calculates what year I was born.”

Step 2: Copy the AI’s response

The AI will give you code in a formatted box. Click “Copy” or manually select and press Ctrl+C.

Step 3: Paste into your chosen environment

If using IDLE:

  • Open IDLE → File → New File (Ctrl+N)
  • Paste (Ctrl+V)
  • Save as something.py
  • Press F5 to run

If using VS Code:

  • New file → Paste → Save as .py → Click Run

If using Notepad:

  • Paste → Save as something.py → Run from Command Prompt

Part 4: Running Your Python Code (All Methods Compared)

MethodHow to RunBest When…
IDLE EditorPress F5You want to see code and output side by side
IDLE ShellType directly after >>>Testing one or two lines from AI
VS CodeClick ▶ button or Ctrl+F5Working on larger scripts
Command Promptpython filename.pyYou want to keep everything in terminal
Double-click .py fileJust open itScript has input() at end to pause

Part 5: Installing Extra Libraries (When AI Uses Them)

Sometimes the AI will say: “You need to install the requests library” or include import pygame at the top.

How to install Python packages on Windows:

  1. Open Command Prompt (Win + Rcmd)
  2. Type this command (replace requests with whatever library you need):
   pip install requests
  1. Press Enter. You’ll see downloading and “Successfully installed” messages.

Note for IDLE users: After installing a library, you need to restart IDLE completely (close and reopen) for it to recognize the new library.

Common libraries for vibe coding:

LibraryPurposeInstall command
requestsDownload web datapip install requests
pillowEdit imagespip install pillow
pygameMake gamespip install pygame
matplotlibCreate chartspip install matplotlib
pandasWork with spreadsheetspip install pandas

Pro tip: If pip doesn’t work, try python -m pip install requests instead.


Part 6: The Vibe Coding Loop (Works in Any Environment)

┌─────────────────────────────────────────────────┐
│ │
│ 1. Have an idea │
│ ↓ │
│ 2. Ask AI: "Write Python to..." │
│ ↓ │
│ 3. Copy code into IDLE/VS Code/Notepad │
│ ↓ │
│ 4. Run it (F5 in IDLE, ▶ in VS Code) │
│ ↓ │
│ 5. See what happens │
│ ↓ │
│ 6. Paste errors back to AI │
│ ↓ │
│ 7. Ask for changes: "Make it faster/ │
│ add colors/ask for more input" │
│ ↓ │
│ 8. Replace file contents, run again │
│ ↓ │
│ 9. Experiment freely — break things, │
│ tweak numbers, add print() calls │
│ ↓ │
│ 10. Save working versions with new names │
│ │
└─────────────────────────────────────────────────┘

Part 7: Real Vibe Coding Example Using IDLE

You type to AI:

“Write Python that prints a random joke about programmers every time I press Enter. Use the random module.”

AI gives you code. You:

  1. Open IDLE
  2. File → New File (Ctrl+N)
  3. Paste the code
  4. File → Save Asjoke_machine.py
  5. Press F5 to run

It works! Output appears in the IDLE shell window.

But you want more. You type back to AI:

“Add 5 more jokes to the list and make the text green using ANSI color codes.”

AI gives updated code. You:

  1. Go back to the IDLE editor window
  2. Select all (Ctrl+A), delete, paste new code
  3. Ctrl+S to save
  4. F5 to run again

Now you’re vibing with IDLE.


Part 8: IDLE-Specific Troubleshooting

ProblemSolution
Nothing happens when I press F5Did you save the file first? IDLE won’t run unsaved files.
“SyntaxError” but code looks fineCheck for mismatched quotes or parentheses. The error message shows the line number.
Code runs but I can’t type inputMake sure you’re running from editor (F5), not typing directly in shell.
Library works in Command Prompt but not IDLEClose IDLE completely and reopen. IDLE needs a fresh start to see new installs.
Shell is full of old outputPress Ctrl+F6 to restart the shell, or click Shell → Restart Shell
I accidentally closed my codeIDLE sometimes auto-recovers. Check File → Recent Files. Otherwise… you learned to save often!

Quick Reference Card

IDLE Shortcuts (Windows)

ActionShortcut
New fileCtrl+N
Open fileCtrl+O
Save fileCtrl+S
Run current fileF5
Restart shellCtrl+F6
Comment selected linesAlt+3
Uncomment linesAlt+4
Auto-indentTab
Auto-dedentShift+Tab

Command Prompt Commands

# Navigate to your code folder
cd Desktop\VibeCode
# Run a Python script
python filename.py
# Install a library
pip install library_name
# See all installed libraries
pip list
# Exit Python (if you accidentally type just 'python')
exit()

Final Advice: Which Environment Should You Choose?

You are…Best choice
Brand new to codingIDLE — it’s simple and comes with Python
Vibe coding for fun, small scriptsIDLE — instant, no distractions
Learning Python by experimentingIDLE — paste AI code, tweak, run, repeat
Building a game or web appVS Code — better for larger projects
On an old/slow computerIDLE — very lightweight
Wanting AI inside your editorVS Code + Continue/Copilot
Minimalist who loves the terminalNotepad + Command Prompt

For most hobbyist vibe coders: Start with IDLE.

It’s already on your computer after installing Python. You don’t need to download anything else. Press F5 and your AI-generated code comes to life. That’s the vibe.


Now go vibe: Open a chat with your AI, ask for something fun, paste it into IDLE, press F5, and watch what happens. 🐍✨