Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tools to develop Python code

Introduction

We’ve seen that Python is dynamically typed and interpreted. These properties make it very flexible and beginner-friendly, but they also mean that many errors that a compiled language would catch at compile time will only surface at runtime in Python. This makes tooling and testing essential.

Developer tools and good practices

The main categories of tools a Python developer relies on are:

We will come back to each of these in later sections. This page focuses on the first line of defense: your editor.

Virtual environments

Python packages can be installed globally, but it quickly leads to conflicts between projects requiring different versions of the same library. Virtual environments solve this by giving each project its own isolated set of installed packages.

You have already set up and activated the virtual environment for this training with pdm sync. Make sure it is always activated when working on the exercises — if you open a new terminal, you will need to activate it again.

A good editor will show you which environment is currently active and let you switch between them easily. In VSCode, the active interpreter is shown in the status bar at the bottom of the window — check that it points to the training’s virtual environment.

Editors

A good editor is not just a place to type text — it actively helps you write correct code. Key features to look for:

Among open-source editors suitable for Python:

PyCharm is a popular proprietary alternative with strong Python-specific features (a free community edition exists).

Most editors support syncing your configuration across machines (via a settings sync feature or a dotfiles repository), which is worth setting up early.

A note on Spyder

Spyder is an IDE designed specifically for scientific Python. It will feel familiar to users coming from Matlab: it has a variable explorer, an integrated IPython console, and a layout that encourages interactive, exploratory work. It is a perfectly valid choice for scientific computing workflows and is used by many researchers.

In this training we focus on VSCode and JupyterLab, which cover the widest range of use cases and are good choices for most participants. If you already know Spyder well, feel free to use it for the exercises — but we won’t have time to cover it, so you will need to find the equivalent features on your own.

Where and how to find help

No developer works in isolation. Knowing where to look for help is a skill in itself.