Python远程开发环境准备

为了在远程机器上调试修改后的代码,需要准备远程开发环境。

查看当前机器是否安装Python解释器:python --version

安装Python解释器。

参考:https://code.visualstudio.com/docs/remote/ssh

To install the OpenSSH components on Windows 11 devices:

  1. Open Settings, select System, then select Optional Features.

  2. Scan the list to see if the OpenSSH is already installed. If not, at the top of the page, select View Features, then:

    • Search for OpenSSH Client, select Next, then select Install
    • Search for OpenSSH Server, select Next, then select Install
  3. Open the Services desktop app. (Select Start, type services.msc in the search box, and then select the Service app or press ENTER.)

  4. In the details pane, double-click OpenSSH SSH Server.

  5. On the General tab, from the Startup type drop-down menu, select Automatic and then select Ok.

  6. To start the service, select Start.

如果发现ssh无法连接,请为Windows账号设置一个密码,并且防火墙的Inbound Rules的Profile设置为All。

更改pip下载源并安装uiautomation库:

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip install uiautomation
生成一对key pair,把公钥内容放入一个名为administrators_authorized_keys的文件里,把这个文件放到C:\ProgramData\ssh\下,注意这个目录是隐藏的。参考:Key-based authentication in OpenSSH for Windows | Microsoft Learn

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值