IntelliJ IDEA 2022.2 Help

Configure a system interpreter

To work with your Python code in IntelliJ IDEA, you need to configure at least one interpreter. A system interpreter is the one that comes with your Python installation. You can use it solely for all Python scripts or take it as a base interpreter for Python virtual environments.

Configure a system Python interpreter

  1. Navigate to File | Project Structure or press Ctrl+Alt+Shift+S.

    Adding a new SDK
  2. In the Project Structure dialog, select SDKs under the Platform Settings section, click Add a new SDK, and choose Add Python SDK from the popup menu.

    Adding a new Python SDK
  3. In the left-hand pane of the Add Python Interpreter dialog, select System Interpreter.

  4. In the Interpreter field, type the fully-qualified path to the required interpreter executable, or click the Browse button and in the Select Python Interpreter dialog that opens, choose the desired Python executable and click OK.

    When configuring the base interpreter, you need to specify the path to the Python executable. If IntelliJ IDEA detects no Python on your machine, it provides the following options:

    • Specify a path to the Python executable (in case of non-standard installation)

    • Download and install the latest Python versions from python.org

    • Install Python using the Command-Line Developer Tools (macOS only).

    Downloading Python when creating a new project
    Downloading Python when creating a new project

    You will need admin privileges to install, remove, and upgrade packages for the system interpreter. When attempting to install an interpreter package through an intention action, you might receive the following error message:

    System Interpreter warning message
    As prompted, consider using a virtual environment for your project.

  5. Click OK to complete the task.

For any of the configured Python interpreters (but Docker-based), you can:

Last modified: 19 September 2022