1、 下载Python解释器
到https://www.python.org/downloads/,下载较新的解释器版本,并安装。
2、 安装解释器
运行安装,建议选择“自定义安装”。
自定义选择需要安装的选项,其中“Associate files with Python”、”Create shortcuts for installed applications”为必选项。
选择“下一步”完成安装过程。
3、 运行Python解释器
运行windows powershell,运行python可进入“交互式模式”,若python后接“文件名.py”那么则运行python程序。
4、 Python文本编辑器
建议不使用windows自带的“记事本”或”word”,因为会自动插入一些不可见的特殊字符,导致运行出错。
建议使用“Visual Studio Code”,对代码的编辑很方便。