简体   繁体   English

无法运行程序“ pip --version”(在目录“。”中):error = 2,没有这样的文件或目录

[英]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.

相关问题 PyCharm 错误:无法运行程序,错误=2,没有这样的文件或目录 - PyCharm error: Cannot run program, error=2, No such file or directory 无法运行程序(python)没有这样的文件或目录 - Cannot run program (python) No such file or directory 错误:无法运行ssh:没有此类文件或目录 - error: cannot run ssh: No such file or directory PySpark:无法运行程序“/home/user/venv/bin/python”:错误=2,没有这样的文件或目录 - PySpark : Cannot run program “/home/user/venv/bin/python”: error=2, No such file or directory pip --version zsh:没有这样的文件或目录:usr/local/bin/pip3 - pip --version zsh: no such file or directory: usr/local/bin/pip3 如何在python上安装pip(错误:无此类文件或目录) - How to install pip on python (error : No such file or directory) 为什么我在 macOS Catalina 下收到错误:Cannot run 'uic': “execvp: No such file or directory” for a PySide2 program? - Why do I get the error: Cannot run 'uic': “execvp: No such file or directory” for a PySide2 program under macOS Catalina? java.io.IOException:无法运行程序“python”(在目录“D:\\Doc\\module\\subject”中):CreateProcess error=2, - java.io.IOException: Cannot run program "python" (in directory "D:\Doc\module\subject"): CreateProcess error=2, 哪个python…文件目录PIP - Which python… file directory PIP Python pip install kivy致命错误C1083:无法打开包含文件:'GL / glew.h':没有这样的文件或目录 - Python pip install kivy fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM