JetBrains Fleet 1.48 Help

Getting started with Python

This tutorial helps you get started with Python development in JetBrains Fleet. It covers installation, project setup, and working with Python code.

Prerequisites

Download and install JetBrains Toolbox

  • Download and install JetBrains Toolbox.

    For macOS, you can also download the installer that matches your processor type: Apple Silicon or Intel. Ensure you select the correct option based on your system's processor.

Download and install JetBrains Fleet

Python environment

JetBrains Fleet supports the following Python versions:

  • Supported Python versions: 2.7 and 3.6 through 3.11.

    Download the version of Python that matches your operating system from the official website.

    If you are on Windows, you can also download Python from the Microsoft Store.

  • Supported Python virtual environments: .venv/ or venv/ directories, or projects that contain a Pipfile or a Poetry pyproject.toml file.

Set up a workspace

A workspace is the directory that contains your project. It includes both project files and settings. You can either open an existing project or start a new one by opening an empty directory.

Open a workspace

  1. Press ⌘ O or select File | Open from the main menu.

  2. In the file browser, navigate to the folder containing your code and click Open.

Configure a Python interpreter

In Smart Mode, which is covered later, JetBrains Fleet automatically detects a virtual environment and configures a Python interpreter if your project workspace contains any of the following:

  • .venv/ or venv/ directories

  • Pipfile

  • A Poetry pyproject.toml file

Otherwise, you can configure a Python interpreter manually, as described below.

Configure a Python interpreter for the workspace

  1. Do one of the following:

    • Click the Python interpreter selector in the bottom-right corner of the JetBrains Fleet window:

      Selecting a Python interpreter in the widget
    • Press ⌘ ,, switch to the project settings tab, and click the Python drop-down in the Toolchains | Python section:

      Selecting a Python interpreter for the workspace
  2. Do one of the following:

    • Select one of the previously configured Python interpreters.

    • Click Add, and then specify the path to a Python executable.

Enabling Smart Mode

You can use JetBrains Fleet as a smart text editor, rather than a full-fledged code editor. However, if you need code intelligence features, you can enable them by turning Smart Mode on.

Enable Smart Mode

  • In the top-right corner of the window, click Smart Mode, then Enable.

    After you click the Enable button, you may have to wait for some time, while the backend is being prepared.

    Smart Mode popup

JetBrains Fleet provides a variety of coding assistance features. Below are a few examples to help you get a sense of how they work in practice. This is not a complete list, but a good starting point for exploring what JetBrains Fleet can do.

Use quick-fixes and intention actions

  • Press ⌥ ⏎ to access actions that Fleet suggests in the current context.

    invoke intention actions

Refactor code

  • Place the caret at a literal or select an expression, press ⌃ R, and enter the new name for the variable.

    renaming a variable
  • Navigate to a symbol’s declaration by pressing ⌘ B.

  • Use code interlines to navigate to usages and hierarchy members.

  • Navigate between errors using ⌘ E and ⌘ ⇧ E.

Running your code

With Smart Mode enabled and a configured Python interpreter, you can run your project. You can use the gutter icon in the editor or create a run configuration to fine-tune how your application is executed.

Run from the editor

  • Navigate to the entry point of your application and click the run icon in the gutter. Select Run `main`.

    Running a script using a gutter icon
19 May 2025