要运行一个文件夹内的 Python 文件,您需要: 打开命令行/终端窗口。进入到该文件夹的目录,例如:cd /path/to/folder运行以下命令:python filename.py 其中 filename.py 是您想要运行的 Python 文件的名称。