Logo
READLEARNKNOWCONNECT
Back to Lessons

    Page

  • - Why You Need a Coding Environment
  • - Choose Your Editor
  • - Option 1: Set Up VS Code for Python
  • - Select Your Python Interpreter
  • - Option 2: Set Up PyCharm
  • - Using the Terminal
  • - Create Your First Workspace
  • - Mini Project Step

2. Setting Up Your Python Environment

Level: BeginnerDuration: 27m

Why You Need a Coding Environment

Now that Python is installed, let's set up a comfortable place to write code. This is where we’ll spend most of our time. The tool we use is called an IDE (Integrated Development Environment) or code editor.

💡 Think of your IDE as your coding home — you want it clean, organized, and ready to help you write great Python.

Choose Your Editor

You can use any editor you like, but these two are **beginner-friendly and powerful**:

EditorWhy Choose It?
VS Code (Recommended Lightweight Option)Fast, customizable, works for many languages, great extensions
PyCharm (Beginner Friendly Setup)Comes pre-configured for Python, smart auto-complete, good for large projects

✅ Tip: If you're not sure what to choose, go with **VS Code**. If you want everything configured automatically for Python, choose **PyCharm**.

Option 1: Set Up VS Code for Python

  • Download VS Code from https://code.visualstudio.com and install it.
  • Open VS Code and go to the Extensions tab.
  • Search for and install the extension: "Python" by Microsoft.
  • Install also: "Pylance" (optional, but great for auto-complete).

Select Your Python Interpreter

VS Code needs to know which Python to use.

bash
Press Ctrl + Shift + P
Type: Python: Select Interpreter
Choose Python 3.x

Option 2: Set Up PyCharm

PyCharm is a full IDE built just for Python. It configures most things for you automatically.

  • Download PyCharm Community Edition from https://www.jetbrains.com/pycharm/.
  • Install and open it.
  • Click "New Project" → choose a folder.
  • PyCharm automatically detects Python and sets everything up!
💡 VS Code = lightweight and flexible. PyCharm = ready-to-go Python setup. You can't go wrong with either.

Using the Terminal

You'll use a terminal to run Python code. Here’s how to access it:

  • **Windows**: Open PowerShell or Command Prompt
  • **macOS**: Open Terminal from Applications → Utilities
  • **Linux**: Open your system terminal (Ctrl + Alt + T)
bash
python --version
# or
python3 --version

If this shows a version number, your terminal is ready for Python.

Create Your First Workspace

  • Create a folder called python-lessons on your Desktop.
  • Open that folder in VS Code or PyCharm.
  • Inside it, create a file called app.py.
  • Write this code:
python
print("Your Python environment is ready! 🚀")

Run it:

bash
python app.py
# or
python3 app.py

Mini Project Step

Inside app.py, write a small Python script that prints today’s date using your name. For example:

python
print("Hi, I'm Chrise and I'm writing Python on my own computer!")

Download Visual Studio Code

Download PyCharm Community Edition