VSCode Python Setup Guide
VSCode Python Setup Guide
This guide takes you from a stock VS Code installation to a fully configured, professional-grade Python
and game development environment — with real-time results, full library access, intelligent autocomplete,
and a live debugger.
Extensions are what transform VS Code from a basic text editor into a powerful Python IDE. A stock VS Code
knows almost nothing about Python — extensions give it intelligence, autocomplete, real-time feedback, and
access to your libraries. Do this first.
A search bar will appear at the top of the panel. Search for each extension by name below, click the blue Install
button, and wait for it to finish before moving to the next.
Python ESSENTIAL
by Microsoft
The absolute foundation. Gives VS Code the ability to understand, run, and debug Python code. Without this,
nothing else works. Install this first — it is non-negotiable.
Pylance ESSENTIAL
by Microsoft
The language intelligence engine. This is what gives you smart autocomplete that understands your entire
codebase, shows you what parameters a function expects, highlights errors before you run the code, and gives
you full visibility into every library you import.
Jupyter ESSENTIAL
by Microsoft
Transforms VS Code into an interactive notebook environment. With this installed, you can create .ipynb files
where you write code in cells and see results appear instantly inline — right below each block of code. This is
your real-time results solution.
by Kevin Rose
Automatically fixes Python indentation as you type. Python is very strict about indentation — wrong indentation
breaks your code. This extension handles it so you never have to think about it.
GitLens RECOMMENDED
by GitKraken
Connects VS Code directly to Git and GitHub. See who changed what, when, and why. Push and pull your code
to GitHub without leaving VS Code. Essential for version control and building your public portfolio.
Prettier USEFUL
by Prettier
Automatically formats your code to look clean and consistent every time you save. Proper formatting is a
professional habit — this builds it automatically.
by Philipp Kief
Gives every file type a distinct coloured icon in your file explorer. Makes navigating projects with many files
much easier visually. Small quality-of-life improvement that matters.
■ After installing ALL extensions, close VS Code completely and reopen it. This ensures all extensions load properly
and take full effect.
2 Connect VS Code to Your Python Installation
This is the most commonly missed step — and it's why many people find that libraries aren't recognised and
autocomplete doesn't work properly. VS Code needs to know exactly which Python installation to use on your
computer.
1 Open the Command Press Ctrl + Shift + P. A search bar drops down from the top of VS
Palette Code. This is the most powerful feature in VS Code — it gives you
access to every command.
2 Search for the interpreter Type exactly: Python: Select Interpreter — then press Enter. A
command dropdown list will appear showing all Python installations detected on
your computer.
3 Select your Python Choose the option that shows your Python version number —
version something like Python 3.11.x or Python 3.12.x. If you see multiple
options, choose the one NOT labelled as 'system' — that's usually the
one pip installs libraries into.
4 Confirm it worked Look at the very bottom left of your VS Code window. You should now
see your Python version displayed there (e.g. 3.11.4). If you see it —
you're connected.
✓ Once your interpreter is selected, Pylance will immediately begin indexing your Python installation and all installed
libraries. Within 30-60 seconds, autocomplete will become fully intelligent across everything you've installed.
■ If Python is not installed on your computer yet, download it from [Link]. During installation on Windows, tick
the box that says 'Add Python to PATH' — this is critical and easy to miss.
3 Install Python Libraries via pip
pip is Python's package manager — it's how you install any library in the world with a single command. This is
not a VS Code limitation — ALL Python editors work this way. Once installed, a library is available in VS Code
immediately with full autocomplete.
Ctrl ` Opens the integrated terminal (backtick key — top left of keyboard)
A terminal panel opens at the bottom of VS Code. This is a full command line — you type commands here and
press Enter to run them. It works exactly like opening a separate command prompt or terminal window.
Jupyter & pip install jupyter Real-time interactive notebooks — your most
JupyterLab jupyterlab important install
pip install jupyter jupyterlab pygame numpy matplotlib requests Pillow pandas
pip list
This shows every library currently installed. You should see all the ones you just installed in the list. You can
also verify by opening a Python file, typing import pygame, and checking that Pylance does NOT show a red
underline — if it's clean, it's installed.
4 Set Up Jupyter for Real-Time Results
This is the answer to your core problem — seeing results in real time as you code. Jupyter Notebooks let you
write code in individual cells and run each one separately, with output appearing immediately below that cell. No
running the entire script. No waiting. Results appear right next to your code as you work.
1 Create a new file Go to File > New File, OR press Ctrl + N. A new empty file opens.
2 Save it as a .ipynb file Press Ctrl + S to save. Name your file something like
my_first_notebook.ipynb — the .ipynb extension is what tells VS Code
this is a Jupyter notebook, not a regular Python script.
3 Select your kernel VS Code will ask you to 'Select Kernel' at the top right of the file. Click it
and choose your Python interpreter (the same one from Step 2). The
kernel is the Python engine that runs your notebook cells.
4 You now have a You'll see a blank cell with a play button on the left. This is your first
notebook code cell. Everything from here works cell by cell.
Run the cell Press Shift + Enter. The cell runs and output appears immediately below
it. VS Code automatically creates a new cell below for your next block of
code.
Run just one cell You can run any cell at any time, in any order. Change one line, re-run
just that cell. Nothing else is affected.
Add a new cell Click the + Code button at the top of the notebook, or press B on your
keyboard when a cell is selected.
Delete a cell Click the cell, press Escape to exit edit mode, then press D twice (DD).
The cell is deleted.
Change to text/Markdown Press M when a cell is selected (not in edit mode). The cell becomes a
text cell for notes and explanations.
age = 20
year_mastery = age + 5
[Link]('Level (%)')
[Link]()
A bar chart will render INSIDE the notebook, directly below this cell. This is the real-time visual output you were looking for.
5 Use the Python Interactive Window (REPL)
The REPL (Read-Evaluate-Print Loop) is a live Python interpreter that runs inside VS Code. You type one line of
code, press Enter, and see the result instantly. Perfect for quick tests, experiments, and checking how
something works without creating a full file.
A Python interactive window opens at the bottom. You'll see >>> — that means Python is ready and waiting for
your input. Type anything:
>>> 2 + 2
>>> pygame.__version__
'2.5.2'
C:\Users\You> python
>>> _
You're now in a live Python session directly in the terminal. Type code, press Enter, see results. Type exit() to
leave.
Python REPL / Interactive When you want to test one quick thing — check a value, test a function,
verify a library works. In and out fast.
Regular .py Script When you're building a finished program, a game, or an app that needs to
run as a complete unit. Game dev with Pygame always uses .py files.
6 Configure and Use the Debugger
The debugger is one of the most powerful tools in VS Code — and most beginners never use it. Instead of
adding print() statements everywhere to find bugs, the debugger lets you pause your code at any line, inspect
every variable's value at that exact moment, and step through your code one line at a time watching exactly
what happens. This is how professional developers find and fix bugs.
Your code runs normally until it reaches the red dot. Then it pauses. A yellow arrow appears on that line
showing exactly where execution stopped. The Debug panel on the left shows every variable and its current
value.
F10 Step Over — Run the current line and move to the next one. Stays at the same level.
F11 Step Into — If the current line calls a function, jump inside that function to see what happens.
Shift F11 Step Out — Finish the current function and return to where it was called from.
F5 Continue — Resume running normally until the next breakpoint (or end of program).
✓ Pro tip: Once you learn the debugger, you will never use print() to find bugs again. The debugger gives you
complete visibility into your code at any moment. Make this a habit from the start.
7 Tweak Your Settings for Comfort & Efficiency
These settings make VS Code significantly more comfortable to use daily. Small changes that add up to a much
better experience over hundreds of hours of coding.
A search bar is at the top of Settings. Search for each setting name below and change it to the recommended
value:
off The minimap on the right side shows a tiny preview of your
Editor: Minimap
(optional) whole file. Useful later — can be distracting early on.
One Dark Pro The most popular VS Code theme. Dark, high contrast, easy on the eyes. Search:
'One Dark Pro'.
Dracula Official Dark purple theme — very popular with game developers and creative coders.
Search: 'Dracula Official'.
GitHub Dark Clean, minimal dark theme that matches GitHub's interface. Search: 'GitHub
Theme'.
Monokai Pro Rich colours, excellent syntax highlighting. Search: 'Monokai Pro'.
To apply a theme: after installing, press Ctrl+K then Ctrl+T — a theme picker dropdown appears. Click any theme to preview
it live.
8 Your First Complete Jupyter Session
Follow this as a walkthrough. Create a new .ipynb file, select your Python kernel, and run each cell below by
pressing Shift + Enter after typing each one. This confirms your entire setup is working correctly.
my_age = 20
skills_count = 6
# Output
print(f'Name: {my_name}')
print(f'Age: {my_age}')
print(f'Scores: {scores}')
print(f'Average: {[Link]():.1f}')
print(f'Highest: {[Link]()}')
print(f'Lowest: {[Link]()}')
Cell 4 — Test visual output — Matplotlib chart
import [Link] as plt
months_to_start = [0, 3, 6, 0, 2, 3]
colors_list = ['#1B6CA8','#6B3FA0','#E67E22','#2D6A4F','#E91E8C','#22A699']
[Link](figsize=(8, 4))
[Link]('Month')
plt.tight_layout()
[Link]()
✓ If all 5 cells run without red error messages, your VS Code setup is complete and working. You have Python,
Jupyter, NumPy, Matplotlib, and Pygame all confirmed and ready. You are now in a professional Python
development environment.
BONUS — Essential Keyboard Shortcuts — Master Reference
Learning these shortcuts will make you significantly faster. Don't try to memorise all at once — learn 2-3 per
week until they become automatic.
General VS Code
Editing Code
Jupyter Notebooks
Alt Enter Run current cell and insert new cell below
Debugging
F5 Start debugging / continue to next breakpoint
Solution: Python was not added to your system PATH during installation. Solution: Uninstall Python, redownload from
[Link], and during reinstallation tick 'Add Python to PATH' before clicking Install. Then restart VS Code.
Solution: VS Code is pointing to the wrong Python interpreter. Go to Ctrl+Shift+P > Python: Select Interpreter and
reselect your Python installation. Then reload the window with Ctrl+Shift+P > Developer: Reload Window.
Problem: Jupyter shows 'No kernel found' or 'Select Kernel' won't work
Solution: Make sure you ran: pip install jupyter jupyterlab in your terminal. Then restart VS Code completely. When
you open an .ipynb file, click 'Select Kernel' at the top right and choose your Python version.
Solution: Pylance needs a moment after VS Code opens to index your project. Wait 30-60 seconds after opening VS
Code. If it never starts working, check that Pylance is installed and your interpreter is selected correctly.
Solution: For .py files, output appears in the terminal at the bottom (press Ctrl+` to open it). For .ipynb files, output
appears directly below each cell after you press Shift+Enter. Make sure you're using the right file type for what you're
trying to do.
Solution: Add [Link]() or a proper game loop to your Pygame code. Pygame requires an event loop to
keep the window open. This is normal beginner behaviour.
Solution: Disable extensions you're not using (Ctrl+Shift+X, click each extension, Disable). Also close unused files
and terminals. VS Code gets heavier the more extensions run simultaneously.
VS Code Python Setup Guide · Compiled with Claude · April 2026 · Port Harcourt, Nigeria