# Use Remote Python Interpreter in IntelliJ IDEA with cnvrg

In this tutorial, we will take you through the steps required to connect IntelliJ IDEA on your local machine to a remote cnvrg workspace.

# Requirements

You must have the following installed on your local machine:

# Guide

  1. Go to your project's Workspaces tab and launch any workspace type inside cnvrg. Wait for the setup to complete.
  2. On your local machine, run the command cnvrg ssh start workspace_id in a terminal session.

TIP

The workspace_id can be found in the URL for the workspace.

For example, if your workspace is live at https://app.cnvrg.io/acme/projects/recommender/notebook_sessions/show/ekqjsnzerv9x5t62y7yd, then the workspace_id would be ekqjsnzerv9x5t62y7yd.

The corresponding example command would be: cnvrg ssh start ekqjsnzerv9x5t62y7yd.

  1. Wait for ssh to start. During this time, cnvrg will automatically install the requirements in the workspace. When it has started, the command will tell you the host, port, username and password for the SSH session.

  1. Make sure you have the Python plugin installed. Go to Settings/Preferences > Plugins and search for Python.

  1. In your local project, open Project Structure > SDKs. Then click the + button and choose Add Python SDK from the menu.

  1. Choose SSH Interpreter amd fill in the New Server Configuration SSH details based on what cnvrg ssh start has told you.

  1. Click Next.
  2. You will be prompted to enter the SSH Password.

  1. In the following screen, check the Python interpreter path is correct per your image (usually this does not need to be changed). Then, click the folder button next to Sync Folders.
  2. In the pop-up, ensure the project folder's Local Path has /cnvrg set as the Remote Path. Then, click Okay.

  1. Click Finish.

  2. Open Run/Debug Configurations. Click the + button and choose Python from the menu

  1. Set Use Specified Python Interpreter to the remote python instance we just set up.

  1. Click Okay.

  2. Congratulations, you will now have connected to the remote workspace! When you have this remote interpreter selected (it should be the default now), the code will be run inside the remote workspace. Enjoy using all the IntelliJ IDEA features you know and love, backed by the power of a remote cnvrg workspace.

Last Updated: 7/28/2020, 11:30:14 AM