Setup for Python

Learn how to setup for Python on your computer step-by-step. This beginner-friendly guide covers installing Python, setting up VS Code, and writing your first Python program.

Are you ready to start your Python journey? Great! But before you can write your first line of Python code, you need to set up your system properly. Don’t worry — it’s easier than it sounds, and I’ll walk you through everything in a simple, human-friendly way.

Whether you’re using Windows, Mac, or Linux, this guide has you covered.


What Do You Need?

To begin coding in Python, you need two things:

  1. Python Interpreter – This runs your Python code.
  2. Code Editor or IDE – This is where you write your code.

We’ll install both — starting with Python.

Also Read: Introduction to Python


Step 1: Download and Install Python

Python is free and open-source. The latest version (as of now) is Python 3.13.5 Always go for Python 3, as Python 2 is outdated.

Download Python

Go to the official Python website:
👉 https://www.python.org/downloads

Here, it will automatically detect your operating system. Click on the Download Python 3.x.x button.

image 12 Setup for Python
Visit python.org/downloads to Download Python Interpreter

For Windows Users

  1. Run the downloaded installer.
  2. Important: Check the box that says “Add Python to PATH”.
  3. Click Install Now.
install python Setup for Python

Wait for the installation to complete. Once done, you’ll see a success message.

For Mac Users

Python 3 comes pre-installed on newer Macs, but often it’s not the latest version. So, it’s better to install the latest manually using:

  • The installer from python.org
  • Or via Homebrew: brew install python

For Linux Users

Python is already installed on most Linux distributions. You can update it using your terminal:

sudo apt update
sudo apt install python3

Step 2: Check Python Installation

Let’s confirm if Python is installed properly.

On Windows/Mac/Linux:

Open your terminal (Command Prompt or PowerShell for Windows, Terminal for Mac/Linux) and type:

python --version

OR

python3 --version

You should see something like:

image 1 1 Setup for Python

If it shows an error, go back and make sure Python was added to PATH correctly.


Step 3: Install a Code Editor

Now that Python is installed, you’ll need a code editor to write and run your Python code.

Best Option: VS Code (Visual Studio Code)

VS Code is light, fast, beginner-friendly, and free. Here’s how to set it up:

  1. Visit: 👉 https://code.visualstudio.com
  2. Download and install VS Code for your operating system.
  3. Once installed, open VS Code.
  4. Go to Extensions (on the left sidebar).
  5. Search for Python and install the extension by Microsoft.
image 2 1 Setup for Python
Download VS Code Editor
Python Extension for VS Code
Install Python extension for Visual Studio Code

Alternative Editors:

  • Thonny – Built for beginners. Comes with Python pre-installed.
  • PyCharm – Powerful IDE, but heavier. Great for advanced work.

Step 4: Write Your First Python Program

Let’s test everything with a simple program!

In VS Code:

  1. Create a new folder (e.g., python_projects).
  2. Inside it, create a new file called hello.py.
  3. Open it and type:
print("Hello, SmartTejas!")

  1. Right-click on the file and select Run Python File in Terminal
    (You need the Python extension installed for this)
first python code Setup for Python

You should see:

Hello, SmartTejas!

If you see this — congratulations, your Python setup is complete! 🎉


Optional: Use Python from the Command Line

If you want to run a Python file using the terminal, navigate to the folder where your .py file is saved and run:

python hello.py

Or on some systems:

python3 hello.py

Bonus: Install pip and Virtual Environment (Optional for Now)

Python comes with pip (Python’s package installer). Try this:

pip --version

This confirms if pip is installed.

To manage project dependencies separately, you’ll later use virtual environments:

python -m venv env

We’ll cover this in a later tutorial.


Final Thoughts

That’s it! You’ve successfully installed Python and a code editor, and even ran your first Python program. 🎉

Take your time with this setup — once you’re done, you’re ready to explore the exciting world of Python programming.

In the next tutorial, we’ll dive into writing actual Python code, learning variables, data types, and more.

👉 Stay tuned and keep learning with SmartTejas!


Quick Recap

StepWhat You Did
1Downloaded & Installed Python
2Verified Installation via Terminal
3Installed a Code Editor (VS Code)
4Wrote and Ran First Python Program

What’s Next?

In the next post, we’ll learn about the Python Variables and Data Types

Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *

Translate »
Scroll to Top