Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to remote interpreter when starting PyCharm

I have a remote interpreter set up in PyCharm.

Everytime I close and reopen PyCharm, the connection seems to be broken, and the process to "reopen" the connection doesn't feel efficient to me.

Before doing the following, it is not possible to run any script.

Here is what I usually do:

  1. File -­> Settings
  2. Project -> Project Interpreter
  3. Click on the gear icon on the right.
  4. Choose "More"
  5. With my remote interpreter selected, click on "Edit"
  6. Change "SSH Credentials" for "Deployment Configuration" (all the info is already filled)
  7. Click "ok" multiple times to close everything up.

At that point, I can run any scripts on the remote machine.

What is the best/fastest way to do this? (any way to "save the settings"?)

like image 823
Gabriel L'Heureux Avatar asked Dec 19 '14 01:12

Gabriel L'Heureux


People also ask

How do I connect to a remote server with PyCharm?

Connect to a remote server and open the remote project Ensure you have the Remote Development Gateway plugin enabled. On the PyCharm welcome screen, select Remote Development. In the Run the IDE Remotely section, click SSH Connection.

How does PyCharm connect to interpreter?

Press Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. Expand the list of the available interpreters and click the Show All link. Select the target interpreter and click Edit. You can specify an alternative interpreter name for the selected interpreter.

What is remote interpreter PyCharm?

The central entry point to remote development with PyCharm is the notion of Remote Interpreters. You can configure PyCharm to use Python interpreter from a remote host and set it as your project interpreter. Then you can configure your run/debug configurations to run, debug or test your applications on the remote host.

How do I start an SSH session in PyCharm?

Launch the SSH TerminalFrom the main menu, choose Tools | Start SSH Session. Alternatively, invoke the Help | Find Action Ctrl+Shift+A dialog, search for start ssh.., and select Start SSH Session.


1 Answers

Check option "Visible only for this project" of deployment configuration. This error occurs when the check mark is set.

https://www.jetbrains.com/help/pycharm/2018.3/deployment-connection-tab.html

if this checkbox is selected in an SFTP configuration, you cannot use its SSH credentials for configuring a remote interpreter.

like image 60
b1oki Avatar answered Sep 30 '22 22:09

b1oki