In PyCharm, you can configure an SSH interpreter. Cloudera Machine Learning uses
this method to connect to PyCharm and act as its interpreter.
Before you begin, ensure that the SSH endpoint for Cloudera Machine Learning is running on your local machine. These instructions were written for
the Professional Edition of PyCharm Version 2019.1 and are meant as a starting point. If
additional information is required, see the documentation for your version of PyCharm for
specific instructions.
-
Open PyCharm.
-
Create a new project.
-
Expand Project Interpreter and select Existing
interpreter.
-
Click on ... and select SSH
Interpreter
-
Select New server configuration and complete the fields:
- Host: localhost
- Port: 2222
- Username: cdsw
-
Select Key pair and complete the fields using the RSA private
key that corresponds to the public key you added to the Remote
Editing tab in the Cloudera Machine Learning web UI.
For macOS users, you must add your RSA private key to your keychain. In a terminal
window, run the following command:
ssh-add -K <path to your prviate key>/<private_key>
-
Complete the wizard. Based on the Python version you want to use, enter one of the
following parameters:
- /usr/local/bin/python2
- /usr/local/bin/python3
You are returned to the New Project window.
Existing interpreter is selected, and you should see the
connection to Cloudera Machine Learning in the Interpreter
field.
-
In the Remote project location field, specify the following
directory:
-
Create the project.