Sign Up

Sign In

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Sorry, you do not have a permission to ask a question, You must login to ask question.

How to use PyCharm with Google compute engine

  • 0

I have a compute engine instance running on Google cloud platform.

I would like to use the Python interpreter of the compute engine as a remote interpreter with Pycharm. This means that I would be using Pycharm on my local machine and running computations remotely.

Any clue on how to achieve this?


1 Answer

  1. The following requires, as James Hirschhorn pointed out, the Professional verison of PyCharm.

    1. Assign a public IP to the remote machine on GCP.
    2. Run gcloud compute config-ssh to automatically add the VMs of your project to your ~/.ssh/config or manually add the public IP of your VM to it. If you skipped step 1. then you have to run gcloud compute config-ssh every time you re-start the remote VM, because it always gets a new IP assigned.
    3. Use the Host name of the remote you want to connect in your Deployment configuration in PyCharm
    4. Add a remote interpreter: select the remote server from the drop-down (the one previously created) and point PyCharm to the executable python of your Python installation.
    5. Done
    • 0

Sorry, you do not have a permission to answer to this question.