DEV Community

Cover image for ๐Ÿš€ Setting Up Python and VS Code: A Beginner-Friendly Guide
Shreyansh Kumar
Shreyansh Kumar

Posted on

๐Ÿš€ Setting Up Python and VS Code: A Beginner-Friendly Guide

If you're stepping into the world of Python development, your first task is to set up Python and a great code editor like VS Code. Hereโ€™s a super-simple guide to get you started!

Step 1: Download and Install Python

  1. Go to the official Python website: https://python.org
  2. Hover over the Downloads tab and select your OS (e.g., "Download for Windows").
  3. IMPORTANT: During installation, check the box that says โ€œAdd Python to PATHโ€ โ€” this will save you trouble later.
  4. Complete the installation.

Image description

Step 2: Verify Python Installation
Open your terminal (or Command Prompt) and type:

python --version

You should see the version you installed.

Step 3: Download & Install VS Code

  1. Visit: https://code.visualstudio.com
  2. Click โ€œDownload for Windows/Mac/Linuxโ€.
  3. Install using the default settings.

Image description

Step 4: Set Up VS Code for Python

  1. Open VS Code.
  2. Go to Extensions (Sidebar).
  3. Search for โ€œPythonโ€ by Microsoft and click Install.
  4. Press Ctrl + Shift + P (or Cmd + Shift + P on Mac), type "Python: Select Interpreter" and choose the Python version you installed.

Step 5: Run Your First Python Code

  1. Create a new file: hello.py
  2. Write:
print("Hello, Dev.to!")
Hello, Dev.to!
Enter fullscreen mode Exit fullscreen mode
  1. Right-click the editor and select "Run Python File in Terminal".

Youโ€™re all set! Now go build awesome Python projects! ๐ŸŽ‰
If you found this beginner-friendly guide helpful, please leave a like, drop a comment with your favorite part, and follow for more such easy-to-understand tutorials!

Top comments (1)

Collapse
 
kuadimar1910 profile image
Aditya

Simple, clear, and straight to the point โ€” perfect for anyone just starting their Python journey. Thanks for sharing this!"