Installing VSCode and Python
Welcome back to Bite-Sized! In this tutorial, we’ll guide you step-by-step through installing Visual Studio Code (VSCode) and Python on your computer. We’ll finish by running a simple “Hello, World!” program to confirm everything works perfectly.
Step 1: Installing VSCode
- Go to the official website: code.visualstudio.com.
- The site should detect your operating system automatically. Click the download button to get the installer.
- Run the installer:
- Windows users: Make sure to check “Add to PATH” during installation. This allows you to run VSCode commands from the terminal easily.
- Once installed, launch VSCode and get ready for coding!
You can customize VSCode with themes and extensions to match your workflow. We'll cover recommended extensions in upcoming videos.
Step 2: Installing Python
- Visit python.org/downloads to download the latest stable version of Python for your OS.
- Run the Python installer:
- Important: Check the box “Add Python to PATH” before clicking Install Now. This lets you run Python commands from your terminal or command prompt.
- After installation, open your terminal (Command Prompt on Windows, Terminal on Mac/Linux) and type:
This should display the installed Python version, confirming the setup was successful.
python --version
Step 3: Testing Python in VSCode
-
Open VSCode.
-
Click on the Extensions icon on the sidebar (looks like four squares) and search for “Python” by Microsoft. Install this extension — it adds Python support and debugging tools.
-
Create a new file in VSCode, save it as
hello.py. -
In the file, type the classic first program:
print("Hello, World!") -
Run your program by clicking the play button in the upper right corner or right-click the editor and select Run Python File in Terminal.
-
If you see
Hello, World!printed in the terminal, congratulations — your setup works!
In the lower right corner of VSCode, you’ll see which Python interpreter is active — useful if you have multiple Python versions installed.
Additional Resources
- VSCode Official Documentation
- Python.org Getting Started
- How to Use Python in VSCode
- VSCode Python Extension Marketplace
If commands like python or code don’t work in your terminal, double-check that you selected Add to PATH during installation.
What’s Next?
Next up, we’ll install Git — the tool that powers GitHub — and introduce virtual environments to help manage your Python project dependencies.
Thanks for watching and happy coding!