# Use Remote Python Interpreter in PyCharm with cnvrg
In this tutorial, we will take you through the steps required to connect PyCharm on your local machine to a remote cnvrg workspace.
# Requirements
You must have the following installed on your local machine:
- cnvrg CLI installed
- kubectl
- The enterprise version of PyCharm
# Guide
- Go to your project's Workspaces tab and launch any workspace type inside cnvrg. Wait for the setup to complete.
- 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
.
- 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 thehost
,port
,username
andpassword
for the SSH session.
- In your local PyCharm, open Settings/Preferences.
- Search for
project
and selectProject Interpreter
in the left menu.
- Next to Project Interpreter menu, click the gear icon and select Add from the menu.
- In the Add Python Interpreter pop-up, click
SSH Interpreter
in the left menu.
- Enter the SSH details based on what
cnvrg ssh start
has told you. Then, click Next.
- Enter the password from the
cnvrg ssh start
command. Then, click Next.
- 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.
- In the pop-up, ensure the project folder's Local Path has
/cnvrg
set as the Remote Path. Then, click Okay.
- Click Finish.
- With PyCharm open regularly, open the Interpreter settings (next to the play button).
- On the popup, set the Working directory as
/cnvrg
.
- 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 PyCharm features you know and love, backed by the power of a remote cnvrg workspace.