Download VS Code
Visual Studio Code is available for all operating systems. The installation is quick and straightforward.- Windows
- macOS
- Linux
- Go to code.visualstudio.com
- Click the big download button (it detects Windows automatically)
- Run the downloaded installer
- Important: Check these options during installation:
- ✓ Add “Open with Code” action to Windows Explorer file context menu
- ✓ Add “Open with Code” action to Windows Explorer directory context menu
- ✓ Register Code as an editor for supported file types
- ✓ Add to PATH
- Click “Next” and “Install”
- Click “Finish” when done
Verify installation
Once installed, let’s make sure VS Code is working:-
Open VS Code:
- Windows: Search “Visual Studio Code” in Start menu
- macOS: Find it in Applications or press
Cmd + Spaceand search - Linux: Type
codein terminal or find it in your applications menu
- You should see the Welcome tab
- The interface should look clean and modern
Install Python extension
VS Code needs the Python extension to work properly with Python files:- Click the Extensions icon in the left sidebar (it looks like 4 squares)
- Search for “Python”
- Find the one by Microsoft (it has millions of downloads)
- Click “Install”
- Wait for installation to complete
The Python extension adds syntax highlighting, code completion, debugging, and more. It’s essential for Python development.
Configure Python execution
After installing the Python extension, enable this important setting:- Open Settings (
Ctrl/Cmd + ,) - Search for “Python Terminal Execute In File Dir”
- Check the box to enable it
open('data.csv'), it will look for the file in the same folder as your script, which is usually what you want. Without this setting, it would look in your project root instead, causing “file not found” errors.
Additional recommended extensions
While VS Code works great with just the Python extension, here are a few more I recommend:Pylance
- Search for “Pylance” by Microsoft
- Provides even better code completion and error detection
- Works alongside the Python extension
Jupyter
- Search for “Jupyter” by Microsoft
- Enables interactive Python mode (we’ll use this later)
- Essential for data science and AI work
Customize appearance (optional)
I’ve been using these settings for years - they’re easy on the eyes:Theme
- Install “Atom One Dark Theme”
- Press
Ctrl/Cmd + K, thenCtrl/Cmd + Tto select it
Icons
- Install “Material Icon Theme” by Philipp Kief
- Makes file types easier to recognize
Tree indentation
- Open Settings (
Ctrl/Cmd + ,) - Search for “tree indent”
- Change from 8 to 20 for clearer folder structure
View keyboard shortcuts: Open Command Palette (
Ctrl/Cmd + Shift + P) and search “keyboard shortcuts”. You can search for any command and change its shortcut by clicking the pencil icon.Check Python detection
After setting up VS Code:- Press
Ctrl + Shift + P(Windows/Linux) orCmd + Shift + P(macOS) - Type “Python: Select Interpreter”
- You should see your Python installation listed
- If not, we’ll fix this in the next section
Create a workspace
Learn how to organize your Python projects