
上QQ阅读APP看书,第一时间看更新
2.1.1 Windows系统下的安装
首先从官方网站(https://www.python.org/downloads/windows)下载Python 3版本的安装包,64位Windows操作系统可以下载Windows x86-64 executable installer,32位操作系统可以下载Windows x86 executable installer。此处演示系统为Windows 10,64位操作系统。如图2-1所示为Python 3环境的下载页面。

图2-1 Python 3下载页面
下面开始安装Python 3。
1)下载完成后,直接双击Python安装包,进入图形安装界面。勾选添加路径选项,点击Customize installation选项,如图2-2所示。

图2-2 安装初始界面
2)勾选Install for all users选项,设置好Python的安装路径,点击Install按钮进行安装,如图2-3所示。

图2-3 设置安装路径
3)等待片刻,就可以看到安装成功的界面,点击Close按钮,完成安装,如图2-4所示。

图2-4 安装完成
4)通过Windows+R快捷键打开运行窗口,在窗口中输入cmd进入命令行模式,输入python-V验证Python环境是否正确安装,如图2-5所示。

图2-5 cmd安装验证