This guide will help you set up Visual Studio Code for Python development in the Python Kickstart course.
- Python 3.x installed on your system
- Visual Studio Code downloaded and installed
- Open Visual Studio Code
- Click on the Extensions icon in the left sidebar (or press
Ctrl+Shift+X) - Search for "Python" in the marketplace
- Find the official Python extension by Microsoft
- Click Install
- Open a new terminal in VS Code (`Ctrl+Shift+`` or View → Terminal)
- Type
python --versionand press Enter - You should see output like:
Python 3.x.x - If you see an error, Python may not be installed or not in your PATH
- Create a new file called
hello.py - Add this code:
print("Hello, World!")
- Save the file
- In the terminal, run:
python hello.py
- Open your
hello.pyfile - Look for the "Run" button (
▶️ ) in the top-right corner - Click it to run your code
- Output will appear in the terminal panel
The Python Kickstart course uses automated tests to give you instant feedback on your exercises.
-
Install dependencies (including pytest):
pip install -r requirements.txt -
Test your exercise solutions:
# Test a specific exercise (replace with your chapter/exercise) pytest tests/test_01_intro.py::TestExercise01_01::test_hello_world_output -v # Test all exercises in a chapter pytest tests/test_01_intro.py -v # Test all exercises pytest tests/ -v
-
Understanding test results:
- ✅ PASSED: Your solution works correctly!
- ❌ FAILED: Check the error message to see what needs fixing
- The
-vflag gives you detailed output
For complete testing instructions, see the main README.md and tests/README.md.
- Auto-completion for Python code
- Hover over variables/functions for information
- Error highlighting and suggestions
- Click to the left of a line number to set a breakpoint (red dot)
- Press
F5or click the Debug icon - Use the debug panel to step through code
- Run Python commands directly in VS Code
- Access to pip for installing packages
- Git commands for version control
- Ensure Python is installed and added to your system PATH
- Try
python3instead ofpython - Restart VS Code after installation
- Reload VS Code (
Ctrl+Shift+P→ "Developer: Reload Window") - Check that the Python extension is enabled
- Verify Python interpreter selection (bottom status bar)
- Install required packages:
pip install <package-name> - Check that you're in the correct directory
- Use virtual environments for project isolation
Once VS Code is set up:
- Clone or download the Python Kickstart repository
- Open the folder in VS Code
- Install dependencies:
pip install -r requirements.txt - Start with the exercises in the
exercises/directory - Run tests to check your progress
Consider using GitHub to save and sync your work across devices:
- 🐙 Using GitHub - Complete guide to forking and syncing your work
- 🚨 Troubleshooting - Solutions to common Python and setup issues
Happy coding! 🐍