在远程服务器上运行本地python文件
为了在远程服务器上运行本地python脚本,我使用以下命令:在远程服务器上运行本地python文件,python,ssh,import,cat,Python,Ssh,Import,Cat,为了在远程服务器上运行本地python脚本,我使用以下命令: cat hello.py | ssh user@192.168.1.101 python - 但是当我想运行一个脚本来导入一些文件时 import _init_paths from fast_rcnn.config import cfg from fast_rcnn.test import im_detect from fast_rcnn.nms_wrapper import nms 上面的命令不能解决我的问题。如何在远程服务器上
cat hello.py | ssh user@192.168.1.101 python -
但是当我想运行一个脚本来导入一些文件时
import _init_paths
from fast_rcnn.config import cfg
from fast_rcnn.test import im_detect
from fast_rcnn.nms_wrapper import nms
上面的命令不能解决我的问题。如何在远程服务器上运行这样的python文件
谢谢,您是否能够将文件直接scp到服务器并在那里工作?这似乎是最简单的选择。我必须在服务器上运行python文件,并以raspberry pi获得输出。Raspberry pi没有足够的能力运行python文件。是否有重复的函数、方法等?这有点粗糙,但你可以做(cat file1.py和cat file2.py和cat…)|嘘。。。将所有文件编译成一个大脚本。这应该会给出预期的结果。我不能像cat folder_name/| ssh???cat只适用于afaik文件,即使您可以,它也可能以错误的顺序读取它们。