我想在我的Windows cmd终端中运行google-python-exercise中的hello.py文件[关闭]

问题描述 投票:-2回答:1

我想在我的Windows cmd终端中运行google-python-exercises中的hello.py文件。键入python显示的是Python 2.7.14的确切python版本,但输入google-python-exercises> python hello.py会返回错误。

python cmd
1个回答
1
投票

要运行python文件,您应该与文件位于同一目录中(为了方便),然后键入python filename.py。要在Windows上更改目录,可以在cmd提示符下键入cd folder/directory

© www.soinside.com 2019 - 2024. All rights reserved.