如何在终端上运行Python脚本? [英] How to run Python script on terminal?
本文介绍了如何在终端上运行Python脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Terminal中运行Python脚本,但是我不知道怎么办?我已经在目录"/User/luca/Documents/python"中保存了一个名为gameover.py的文件.
I want to run a Python script in Terminal, but I don't know how? I already have a saved file called gameover.py in the directory "/User/luca/Documents/python".
推荐答案
您需要在 python 上安装你的系统.然后,您可以在终端的正确目录中运行它:
You need python installed on your system. Then you can run this in the terminal in the correct directory:
python gameover.py
这篇关于如何在终端上运行Python脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文