如何在终端上运行 Python 脚本? [英] How to run Python script on terminal?
本文介绍了如何在终端上运行 Python 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在终端中运行 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屋!
查看全文