Configuring Remote Interpreters via Docker Compose
In this section:
Before you start working with Docker Compose, make sure that the Docker Compose integration plugin is enabled. The plugin is bundled with PyCharm and is activated by default. If it is not, enable the plugin as described in Enabling and Disabling Plugins.
As of this writing, Docker Compose integration in PyCharm is not supported on Windows.
Configuring a remote interpreter vis Docker Compose
To configure a remote Python interpreter, follow these steps:
- In the Project Interpreters page of the Settings/Preferences dialog box, click .
- From the drop-down list, choose .
- In this dialog box that opens, do the following:
- Click the radio button Docker Compose.
- Choose the desired server from the drop-down list, or click New.
- Click the browse button next to the field
If the path points to a specific file (for example,
docker-compose.yml), then this configuration will be used.
If the path points to a directory, then the configuration is defined by the file
docker-compose.ymland (if exists)
- Specify the service that represent your project.
- The Python interpreter path field displays the path to the desired Python executable. You can accept default, or specify a different one.
- Click OK in the Configure Remote Python Interpreter dialog box. The configured remote interpreter is added to the list.
From this point, autocompletion, code inspections, as
well as other features, will be driven by the interpreter from the Docker container derived from the
service description in