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

In this section:

Prerequisite

A ssh server should run on a remote host, since PyCharm runs remote interpreter via ssh-session.

  1. In the Python Interpreters page of the project settings, click add.
  2. In the drop-down list, choose Remote.

    py_remote_interpreter_choose

    The dialog box Configure Remote Python Interpreter opens:

    py_configure_remote_interpreter

  3. In this dialog box, do one of the following:
    • Click the link Fill from deployment server settings. So doing, the remote server settings are taken from one of the servers which have already been configured, as described in the section Creating a Server Configuration.
      Note that the link appears in the dialog box if at least one remote server has been configured in advance in the Deployment page of the Settings dialog.
    • In the Settings area, fill in the server information manually (host, port, etc.).
  4. In the Python interpreter path field, specify the path to the desired Python executable.
    In the Copy PyCharm helpers to field, specify the path on the remote host where the helpers will be copied to. In both fields, you can either type the path manually, or click browseButton and locate the desired path. Note that you will have to log in to the remote host.

    py_remote_interpreter_login

  5. Click OK in the Configure Remote Python Interpreter dialog box. The configured remote interpreter is added to the list. The name of such an interpreter is automatically prepended with the prefix remote.

Important note

When a remote Python interpreter is added, at first the PyCharm helpers are copied to the remote host. PyCharm helpers are needed to run remotely the packaging tasks, debugger, tests and other PyCharm features. Next, the skeletons for binary libraries are generated and copied locally. Also all the Python library sources are collected from the Python paths on a remote host and copied locally along with the generated skeletons. Storing skeletons and all Python library sources locally is required for resolve and completion to work correctly in PyCharm.

PyCharm checks remote helpers version on every remote run, so if you update your PyCharm version, the new helpers would be uploaded automatically and you don't need to recreate remote interpreter.

See Also

Procedures:

Language and Framework-Specific Guidelines:

Reference:

Web Resources: