[英]Installing Python on a fresh new computer using a python script from another one?
So, for example, I have two Windows PCs that are not connected to same network.因此,例如,我有两台未连接到同一网络的 Windows PC。 Let's name them Computer 1 and Computer 2. Computer 2 already has python installed in it and Computer 1 is brand new让我们将它们命名为计算机 1 和计算机 2。计算机 2 已经安装了 python,计算机 1 是全新的
I want to be able to install python environment on Computer 1 using the.exe file that we can get from python.org while sitting at Computer 2我希望能够在计算机 1 上安装 python 环境,使用我们可以从 python.org 获得的 .exe 文件坐在计算机 2 上
Suppose Computer 1 has a.exe file that it received from me.假设计算机 1 有一个从我那里收到的 .exe 文件。 When that exe is run, I want it to install python in their PC当该 exe 运行时,我希望它在他们的 PC 中安装 python
On Linux, you can use scp for step 1在 Linux 上,您可以在步骤 1 中使用 scp
scp local_python_file_or_script.sh remote-user@remote_machine_ip:/path_on_remote/
After this you can use ssh to execute the script on remote machine之后,您可以使用 ssh 在远程机器上执行脚本
ssh user@remote_machine_ip /path_on_remote/local_python_file_or_script.sh
PS. PS。 If the file is not executable on remote machine, you will need to use ssh and change chmod +x PS2.如果该文件在远程机器上不可执行,则需要使用 ssh 并更改 chmod +x PS2。 You will need to find the equivalent for these tools on windows.您需要在 windows 上找到这些工具的等效工具。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.