Skip to content

Development Environment

While you can write Python in Notepad or TextEdit, you shouldn’t. A good Integrated Development Environment (IDE) provides syntax highlighting, code completion, error checking, and debugging tools.

We recommend Visual Studio Code (VS Code), the industry standard for Python development.

  1. Download it from code.visualstudio.com.
  2. Install it like any standard application.

VS Code is a general-purpose editor. To make it a Python IDE, we need to install extensions.

  1. Open Extensions: Click the Extensions icon in the Activity Bar on the side (or press Ctrl+Shift+X).

  2. Search: Type “Python”.

  3. Install: Look for the extension named Python published by Microsoft (usually the top result with millions of downloads). Click “Install”.

    This will also install Pylance (for intelligence/autocompletion) and the Python Debugger.

This is the most common point of confusion for beginners. VS Code needs to know which Python installation to use (e.g., the global one, or a virtual environment).

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
  2. Type and select: Python: Select Interpreter.
  3. Choose the version you just installed (e.g., Python 3.12.x).

Once configured, VS Code gives you superpowers:

  • IntelliSense: As you type, VS Code suggests completions. Try typing print(, and it will show you the arguments the function accepts.
  • Linting: If you make a syntax error (like forgetting a closing parenthesis), VS Code will underline it in red before you even run the code.
  • Running Code: You can click the “Play” button in the top right corner to run your script in the integrated terminal.

To make your code cleaner, we recommend enabling “Format on Save”.

  1. Open Settings (Ctrl+, or Cmd+,).
  2. Search for “Format On Save”.
  3. Check the box.
  4. Search for “Default Formatter” and select “Python” (or “Black” / “Ruff” if you install those specific extensions).