How to use PyCharm with Google compute engine(如何将 PyCharm 与 Google 计算引擎一起使用)
本文介绍了如何将 PyCharm 与 Google 计算引擎一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个在谷歌云平台上运行的计算引擎实例.
I have a compute engine instance running on Google cloud platform.
我想将计算引擎的 Python 解释器用作 Pycharm 的远程解释器.这意味着我将在本地机器上使用 Pycharm 并远程运行计算.
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?
推荐答案
以下要求,如 James Hirschhorn指出,PyCharm 的专业版.
The following requires, as James Hirschhorn pointed out, the Professional verison of PyCharm.
- 为 GCP 上的远程计算机分配一个公共 IP.
- 运行
gcloud compute config-ssh自动将您项目的虚拟机添加到您的~/.ssh/config或手动将您的虚拟机的公共 IP 添加到它.如果您跳过了第 1 步,那么您必须在每次重新启动远程 VM 时运行gcloud compute config-ssh,因为它总是会获得分配的新 IP.~/.ssh/config填充了以下格式的许多条目:
- Assign a public IP to the remote machine on GCP.
- Run
gcloud compute config-sshto automatically add the VMs of your project to your~/.ssh/configor manually add the public IP of your VM to it. If you skipped step 1. then you have to rungcloud compute config-sshevery time you re-start the remote VM, because it always gets a new IP assigned. The~/.ssh/configgets populated with many entries in the following format:
Host the-vm-host-name # use this in PyCharm's Host field
HostName 123.456.789.00 # the VM's IP address
Host 名称python.这篇关于如何将 PyCharm 与 Google 计算引擎一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:如何将 PyCharm 与 Google 计算引擎一起使用
基础教程推荐
猜你喜欢
- 包装空间模型 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 求两个直方图的卷积 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
