How to easily switch between two remote interpreters?

In the new version of PyCharm, it is extremely convenient to configure a remote interpreter by adding a SSH interpreter, and it can help us to configure the deployment automatically at the same time. This makes debuging on a remote server just like debuging locally.

However, when I want to switch from a remote interpreter to another remote interpreter, the deployment configuration cannot be changed by a click (see my last post). Every time I switch to another remote interpreter, the deployment configuration is not updated correspondingly. Also, even I tried to manually update the deployment configuration, it will report an error like 'can't get the credential of the remote server'.

So every time I want to switch from remote interpreter A to another remote interpreter B, I need to first delete B, and re-add B, so the deployment configuration will be automatically done as I mentioned at the beginning. Then I need to wait all my local files to be uploaded to server B again, which can take a lot of time. This is extremely annoying. I am not sure is there any one-click switch for us in PyCharm that I don't know? Or this is indeed a design issue?

Many thanks!

5 comments
Comment actions Permalink

Yes, handling multiple remote interpreters is not supported very well. But you don't need to delete/recreate anything. Just create two remote interpreters and two deployment configurations. When need to switch:

1. Switch the interpreter

2. Switch the default configuration

3. Explicitly sync files with deployment, as they may not be synced automatically just by switching the default deployment

2
Comment actions Permalink

I second this request: it would be very useful to have more than one deployment configurations, linked to interpreters, so when switching an interpreter the relevant deployment configuration becomes active, and syncs up the files on the remote server with the local ones. Currently, the 3-step program described above is a bit of a pain.

2
Comment actions Permalink

I agree. This is truly needed.

1
Comment actions Permalink

Definitely needed.

1
Comment actions Permalink

Yes, running into the problem now and it is huge issue to work on a remote EC2 instance with several conda environments configured to two remote interpreters. I have to redeploy everything to switch between tasks on the same host. Sorely needed.

1

Please sign in to leave a comment.