Aqua 2024.3 Help

Configure remote Python interpreters

Aqua provides full integration with the Python interpreters running on remote hosts.

Depending on the type of the remote interpreter, follow one of the procedures:

Configure a WSL interpreter

  1. 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.

  2. Install the Windows Subsystem for Linux and initialize your Linux distribution as described in the WSL Installation Guide.

  3. If your Linux distribution doesn't come with rsync, you need to install it:

    sudo apt install rsync

    sudo pacman -S rsync

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

  5. 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
  6. In the left-hand pane of the Add Python Interpreter dialog, select WSL.

  7. Select the Linux distribution with the required Python interpreter.

  8. In Python interpreter path field, specify the path to the Python executable. You can accept the default, type in a different path, or click the Browse button to browse.

    Add a remote interpreter using WSL
  9. Click OK.

    The configured remote interpreter is added to the list.

Configure an interpreter using Vagrant

  1. Ensure that the following prerequisites are met (outside of Aqua):

    • One of supported Vagrant providers is installed on your computer.

    • Vagrant is installed on your computer, and all the necessary infrastructure is created.

    • The parent folders of the following executable files have been added to the system PATH variable:

      • vagrant.bat or vagrant from your Vagrant installation. This should be done automatically by the installer.

      • VBoxManage.exe or VBoxManage from your Oracle's VirtualBox installation.

    • The required virtual boxes are created.

  2. Make sure that the Vagrant plugin is enabled.

  3. Ensure that you have properly initiated and started Vagrant. Basically, you need to open the Terminal window and execute the following commands:

    $ vagrant init ubuntu/trusty64

    and

    $ vagrant up

    For more information, refer to Vagrant documentation.

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

  5. 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
  6. In the left-hand pane of the Add Python Interpreter dialog, select Vagrant.

  7. In Python interpreter path field, specify the path to the Python executable. You can accept the default, type in a different path, or click the Browse button to browse.

    Add a remote interpreter using Vagrant
  8. Click OK.

    The configured remote interpreter is added to the list.

Configure an interpreter using SSH

  1. Ensure that there is an SSH server running on a remote host, since Aqua runs remote interpreters via ssh-sessions.

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

  3. 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
  4. Select New server configuration, then specify server information (host, port, and username).

    adding an interpreter via SSH

    Alternatively, you can select Existing server configuration and choose any available deployment configuration from the list.

    existing configurations

    If needed, click the Browse button to review the Connection settings, Mappings, and Excluded paths for the selected deployment configuration. Click Next to continue configuring an interpreter.

  5. In the next dialog window, provide the authentication details to connect to the target server.

    specifying authentication details

    Select Password or Key pair (OpenSSH or PuTTY) and enter your password or passphrase. If Key pair (OpenSSH or PuTTY) is selected, specify:

    • Private key: location of the file with a private key

    • Passphrase: similar to a password, it serves to encrypt the private key.

    Click Next to proceed.

  6. In the next dialog window, verify the path to the desired Python interpreter. You can accept the default, or specify a different one. You have to configure the path mappings between your local project and the server. To do that, click the Browse button 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.

    Setting SSH mappings

    You can also select the checkbox to enable automatic upload of the local changes to the remote server.

  7. Click OK.

    The configured remote interpreter is added to the list.

Configure an interpreter using Docker

  1. Make sure that the following prerequisites are met:

    • Docker is installed, as described in the Docker documentation.

    • You have stable Internet connection, so that Aqua can download and run busybox:latest (the latest version of the BusyBox Docker Official Image). Once you have successfully configured an interpreter using Docker, you can go offline.

    Note that you cannot install any Python packages into Docker-based project interpreters.

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

  3. 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
  4. In the left-hand pane of the Add Python Interpreter dialog, select Docker.

    Adding a Python interpreter using Docker
  5. Select an existing Docker configuration in the Docker server dropdown.

    Alternatively, click New and perform the following steps to create a new Docker configuration:

    Create a Docker configuration

    Click The Add button to add a Docker configuration and specify how to connect to the Docker daemon.

    The connection settings depend on your Docker version and operating system. For more information, refer to Docker connection settings.

    The Connection successful message should appear at the bottom of the dialog.

    The Docker connection settings for interpreter

    This table is not available on a Linux host, where Docker runs natively and you can mount any directory to the container.

  6. Specify the image and the path to the Python executable:

    Configuring a Python interpreter using Docker
  7. Click OK.

    The configured remote interpreter is added to the list.

Configure an interpreter using Docker Compose

  1. Make sure that the following prerequisites are met:

    • Docker is installed, as described in the Docker documentation.

    • You have stable Internet connection, so that Aqua can download and run busybox:latest (the latest version of the BusyBox Docker Official Image). Once you have successfully configured an interpreter using Docker, you can go offline.

    Note that you cannot install any Python packages into Docker-based project interpreters.

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

  3. 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
  4. In the left-hand pane of the Add Python Interpreter dialog, select Docker Compose.

    Adding a Python interpreter using Docker Compose
  5. Select Docker configuration in the Server dropdown.

  6. Specify the docker-compose.yml file in Configuration files and select the service.

    Configuring a Python interpreter using Docker Compose

    Optionally, specify environment variables and edit the Compose project name.

  7. Finally, specify the path to the Python executable:

    Configuring a Python interpreter using Docker Compose
  8. Click OK.

    The configured remote interpreter is added to the list.

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

Last modified: 17 June 2024