Python基础之Python解释器安装(Windows)
Python官网:https://www.python.org/
版本选择:https://www.python.org/downloads/windows/
Python 3.6.8 - Dec. 24, 2018
python-3.6.8-amd64.exe Download Windows x86-64 executable installer
Download URL:https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe
1. 添加环境变量
2. 自定义安装
3. 选择安装Python文档
4. 自定义安装路径
5. 安装完成
6. 手动添加环境变量
用户变量
添加Python 3.6.8的python.exe路径与Scripts脚本路径
添加Python 2.7.16的python.exe路径与Scripts脚本路径
系统变量
添加Python 3.6.8的python.exe路径与Scripts脚本路径
添加Python 2.7.16的python.exe路径与Scripts脚本路径
7. 命令行验证安装是否成功
C:\Users\charl>python
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
8. 运行第一个Python代码
# C:\pycode\hello_world.py
print('Hello World!')
cmd
C:\Users\charl>cd c:\pycode
c:\pycode>python hello_world.py
Hello World!