简体   繁体   English

Python 3.9中如何通过命令行运行程序

[英]How to run the program by command line in Python 3.9

i have a program and the program script, here is it -我有一个程序和程序脚本,就在这里 -

python3.9 Test.py --Start [1,1,1] --End [4,4,4] --Visualize

When I run it in Pycharm terminal, it doesn't work.当我在 Pycharm 终端运行它时,它不起作用。 Where should i input this command?我应该在哪里输入这个命令?

I have searched the inte.net about this topic, but didnt find anything Also chat gpt我在 inte.net 上搜索了有关此主题的内容,但没有找到任何内容 Also chat gpt

It should be just python test.py or python3 test.py You need to be on the exact path of the script.它应该只是python test.pypython3 test.py你需要在脚本的确切路径上。 For example if script is located in c:\desktop your terminal needs to be located in c:\desktop .例如,如果脚本位于c:\desktop您的终端需要位于c:\desktop

Bash, PowerShell, depends on your OS Bash、PowerShell,取决于您的操作系统

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM