运行python程序之前,一定要设置好环境变量,否则无响应。
假设我们的python程序放在D盘的test文件夹下,名字为hello.py,运行方式如下:
- Win+R打开cmd
- 输入:" d: “进入到D盘内
- 输入:" cd test “进入到test文件夹内
- 输入:” python hello.py "
- “ 回车 ” 即可运行程序输出:" hello world "
运行python程序之前,一定要设置好环境变量,否则无响应。
假设我们的python程序放在D盘的test文件夹下,名字为hello.py,运行方式如下: