windows系统安装python
1.python3 下载
官网下载:
https://www.python.org
百度网盘下载:
https://pan.baidu.com/s/1dH0UZg_7Q-YcppR0PjUfzQ
提取码:xljt
以下演示官网下载与安装
进入官网后点击Python 3.7.4
![点击Python 3.7.4](https://upload-images.jianshu.io/upload_images/19371373-4a94726397edc43b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
点击Windows x86-64 executable installer
![点击Windows x86-64 executable installer](https://upload-images.jianshu.io/upload_images/19371373-2c34fbbc55834616.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2.python3 安装
下载完成后双击安装程序
![下载完成后双击安装程序](https://upload-images.jianshu.io/upload_images/19371373-854080271ed34b70.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
先勾选 add Python 3.7 to PATH,然后再选择选装模式
(建议自定义安装)
![先勾选 add Python 3.7 to PATH,然后再选择选装模式](https://upload-images.jianshu.io/upload_images/19371373-f2333efab0b8d460.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
根据自己的需求勾选,若是小白,则全勾选
![根据自己的需求勾选](https://upload-images.jianshu.io/upload_images/19371373-4500396a0ca6a87a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
选择自定义安装目录
![选择自定义安装目录](https://upload-images.jianshu.io/upload_images/19371373-499802f518c01544.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
python安装完成
![python安装完成](https://upload-images.jianshu.io/upload_images/19371373-8fa53bdadd4a6953.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3.检验python是否安装成功
执行python -V
python -V
出现以下内容则代表python安装成功
![出现以下内容则代表python安装成功](https://upload-images.jianshu.io/upload_images/19371373-5bfb5927a448b1a0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
执行python命令,输入python代码查看是否能够运行
![执行python命令,输入python代码查看是否能够运行](https://upload-images.jianshu.io/upload_images/19371373-f64249bd26e77465.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
(注:若执行失败,则可能在安装时没有勾选add Python 3.7 to PATH)
4.若安装时没有勾选add Python 3.7 to PATH
右键此电脑 --> 点击属性 --> 点击高级系统设置
![右键此电脑 --> 点击属性 --> 点击高级系统设置](https://upload-images.jianshu.io/upload_images/19371373-38c81b9ec362c685.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
点击环境变量
![点击环境变量](https://upload-images.jianshu.io/upload_images/19371373-b0b0c62cbd09dc56.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
点击path --> 点击编辑
![点击path --> 点击编辑](https://upload-images.jianshu.io/upload_images/19371373-aa3cf232cf688d6a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
win10的话直接新建后添加G:\code\path\python\Scripts\和G:\code\path\python\(win10末尾不用添加分号“;”),win7的话在末尾添加G:\code\path\python\Scripts;G:\code\path\python;若path变量最末尾的变量无分号,则在开头添加个“;”
此处演示win10系统下配置path变量
![此处演示win10系统下配置path变量](https://upload-images.jianshu.io/upload_images/19371373-7772e3629145b479.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)