Configure remote Python interpreters
IntelliJ IDEA provides full integration with the Python interpreters running on remote hosts.
Depending on type of the remote interpreter, follow one of the procedures:
Configure an SSH interpreter
Ensure that the Python plugin is installed and enabled.
Navigate to
Ctrl+Alt+Shift+S.In the Project Structure dialog, select SDKs under the Platform Settings section, click , and from the popup menu, choose Python SDK.
In the left-hand pane of the Add Python Interpreter dialog, click SSH Interpreter.
In the right-hand pane select New server configuration, then specify server information (host, port, and username).
Alternatively, you can select Existing server configuration and choose any available deployment configuration from the list.
If needed, click to review the Connection settings, Mappings, and Excluded paths for the selected deployment configuration. Click Next to continue configuring an interpreter.
In the next dialog window, provide the authentication details to connect to the target server.
Select Password or Key pair (OpenSSL or PuTTY) and enter your password or passphrase.
Click Next to proceed with the final configuration step.
In the next dialog window, verify the path to the desired Python interpreter. You can accept default, or specify a different one. You have to configure the path mappings between your local project and the server. To do that, click next to the Sync folders field and enter the path to the local project folder and the path to the folder on the remote server.
You can also select the lowest checkbox to enable automatic upload of the local changes to the remote server.
Configure Vagrant
Ensure that a Vagrant instance is created on your machine and properly initialized.
Ensure that the Python plugin is installed and enabled.
Navigate to
Ctrl+Alt+Shift+S.In the Project Structure dialog, select SDKs under the Platform Settings section, click , and from the popup menu, choose Python SDK.
In the left-hand pane of the Add Python Interpreter dialog, click Vagrant:
Click the browse button next to the field Vagrant instance folder, and specify the desired Vagrant instance folder.
This results in showing the link to Vagrant host URL.
The Python interpreter path field displays the path to the desired Python executable. You can accept default, or specify a different one.
Click OK. The configured remote interpreter is added to the list.
Configure WSL
Click the Windows button in the lower-left corner of the screen and start typing
System Information
. To ensure that your system works well with WSL, upgrade your Windows to the latest available version.Install the Windows Subsystem for Linux and initialize your Linux distribution as described in the WSL Installation Guide.
Ensure that the Python plugin is installed and enabled.
Navigate to
Ctrl+Alt+Shift+S.In the Project Structure dialog, select SDKs under the Platform Settings section, click , and from the popup menu, choose Python SDK.
In the left-hand pane of the dialog, click WSL.
Select the Linux distribution and specify the path to the python executable in the selected Linux distribution. Typically, you should be looking for wsl.exe but you can specify any non default WSL distro.
Configure Docker as a remote interpreter
Ensure that you have set up Docker on your machine.
Ensure that the Python plugin is installed and enabled.
Navigate to
Ctrl+Alt+Shift+S.In the Project Structure dialog, select SDKs under the Platform Settings section, click , and from the popup menu, choose Python SDK.
In the dialog that opens, select the Docker option, from the lists select the Docker server (if the server is missing, click New...), and specify the image name:
python:latest
.Python interpreter path should have the default value, for example,
python
:As a result, in the ,
Click OK to complete the task.
Configure Docker Compose as a remote interpreter
Ensure that you have set up and run Docker Compose on your machine.
Ensure that the Python plugin is installed and enabled.
Navigate to
Ctrl+Alt+Shift+S.In the Project Structure dialog, select SDKs under the Platform Settings section, click , and from the popup menu, choose Python SDK.
In the dialog that opens, select the Docker Compose option, from the lists select the Docker server, Docker Compose service (here
web
), configuration file (heredocker-compose.yml
) and Python interpreter path (herepython
).Next, wait while IntelliJ IDEA starts your Docker Compose configuration to scan and index:
Click OK to complete the task.
For any of the configured Python interpreters (but Docker-based), you can: