
1.2.1 IDLE的安装与启动
1.IDLE的安装
(1)下载Python程序安装包
1)在Windows系统下,在浏览器地址栏中输入Python官网的下载地址https://www.python.org/downloads/windows/,显示下载网页,如图1-1所示。由于网页经常改变,看到的网页可能不同。

图1-1 选择要下载的版本
2)如果系统是Windows 7/1064位,选择“Download Windows x86-64 executable installer”版本下载;如果是32位,选择“Download Windows x86 executable installer”版本下载。
(2)安装Python程序安装包
1)找到下载的Python程序安装包,双击打开。运行安装程序,显示安装向导,如图1-2所示。勾选“Add Python 3.7 to PATH”复选框,自动配置环境变量。Install Now是默认文件的安装,Customize installation是自定义安装文件的安装。选择Install Now的安装路径C:\Users\Administrator\AppData\Local\Programs\Python\Python37,这个安装路径在安装其他模块时不容易出错,选择“Install Now”。
2)显示“Setup Progress”界面,如图1-3所示,安装过程需要几分钟。

图1-2 安装向导

图1-3 “Setup Progress”界面
3)显示“Setup was successful”界面,如图1-4所示,安装完成,单击“Close”按钮关闭安装向导对话框。

图1-4 “Setup was successful”界面
2.IDLE的启动
安装完成之后,在Windows的“开始”菜单中展开“Python 3.7”文件夹,显示菜单选项,如图1-5所示。

图1-5 “开始”菜单中的“Python 3.7”文件夹
(1)IDLE(Python 3.764-bit)
“IDLE(Python 3.764-bit)”是Python GUI的选项,它是一个Python Shell程序。Shell是“外壳”的意思,是一个通过输入文本与程序交互的程序。单击这个选项,执行该程序,显示如图1-6所示的窗口。可以在IDLE的“>>>”提示符后输入Python指令,也可以创建Python程序文件。
(2)Python 3.7(64-bit)
“Python 3.7(64-bit)”是Python命令行(Command Line)的选项,单击这个选项,执行该程序,显示如图1-7所示的窗口。可以在“>>>”提示符后输入Python命令。

图1-6 “Python 3.7.4 Shell”窗口

图1-7 “Python 3.7(64-bit)”窗口
(3)Python 3.7 Manuals(64-bit)
“Python 3.7 Manuals(64-bit)”是Python帮助手册的选项,单击该选项,显示如图1-8所示的窗口。

图1-8 Python帮助手册
(4)Python 3.7 Module Docs(64-bit)
“Python 3.7 Module Docs(64-bit)”是Python模块文档的选项,单击该选项,显示如图1-9所示的窗口。

图1-9 Python模块文档