[英]python: can't open file 'python2': [Errno 2] No such file or directory
[英]python: can't open file 'C:\Program': [Errno 2] No such file or directory
我使用以下方法安装了localstack
:
pip install localstack
安装成功完成。
localstack==0.12.19.1
localstack-client==1.26
localstack-ext==0.12.19.2
localstack-plugin-loader==1.0.0
Python 3.9.6
系统环境路径:
C:\Program Files\Python39\Scripts\
C:\Program Files\Python39\
PC 上的 Python 位置:
当我使用与localstack
相关的任何命令时,出现以下错误:
C:\Users\BRT.JNEHME\Desktop\FRC\freight_rate_collector-main>localstack -h
C:\Users\BRT.JNEHME\Desktop\FRC\freight_rate_collector-main>python C:\Program Files\Python39\Scripts\\localstack -h
python: can't open file 'C:\Program': [Errno 2] No such file or directory
任何人对这个问题有任何想法吗?
您需要在 python 命令中添加引号,因为您的路径中有空格
换句话说,你应该这样写:
python "C:\Program Files\Python39\Scripts\localstack" -h
而不是这个
python C:\Program Files\Python39\Scripts\\localstack -h
错误来自您输入的命令:语法不正确。
当你编写一个命令并且这个命令有一个可以找到空格的路径时(这里是你的程序文件的情况),你必须在整个路径中添加引号,以便路径被解释为单个参数而不是两个参数(因为在命令行中,加空格表示加参数)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.