[英]Cannot run program “pip --version” (in directory “.”): error=2, No such file or directory
I execute a simple Linux command through aws emr
. 我通过aws emr
执行一个简单的Linux命令。 This command is launched on the nodes of a cluster: 此命令在集群的节点上启动:
aws emr add-steps --cluster-id j-XXXXXXXXXX --steps Name="XXX",Jar="command-runner.jar",Args=["pip --version"]
or: 要么:
aws emr add-steps --cluster-id j-XXXXXXXXXX --steps Name="XXX",Jar="command-runner.jar",Args=["python --version"]
These basic commands give an error: 这些基本命令会产生错误:
Cannot run program "pip --version" (in directory "."): error=2, No such file or directory
Cannot run program "python --version" (in directory "."): error=2, No such file or directory
I am sure that at least python
is installed on the nodes, because I can execute spark-submit
with *.py
files. 我确信至少在节点上安装了python
,因为我可以使用*.py
文件执行spark-submit
。
The only command that I was able to execute was ls
. 我能够执行的唯一命令是ls
。
PS The objective of using this approach is to be able to execute some Linux scripts on different nodes of the cluster, eg pip install ...
. PS使用此方法的目的是能够在群集的不同节点上执行一些Linux脚本,例如pip install ...
That's why I started with making small experiments and was unable to make them working. 这就是为什么我从做小的实验开始,却无法使它们起作用。
The problem was due to the lack of comma ,
between the arguments. 这个问题是由于缺乏逗号,
参数之间。 There should be pip,--version
instead of pip --version
: 应该有pip,--version
pip --version
而不是pip --version
:
aws emr add-steps --cluster-id j-XXXXXXXXXX --steps Name="XXX",Jar="command-runner.jar",Args=["pip,--version"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.