环境搭建:在VSCode搭建Python环境
1、安装vscode
2、下载python解释器
安装python
![](https://app.yinxiang.com/shard/s61/res/599752e9-63d1-4e7c-8336-a6215adf2c29.png?search=vscode&resizeSmall&width=1094)
下载可执行的安装文件;
![](https://app.yinxiang.com/shard/s61/res/b02d4a04-66e8-4fc9-93d1-112b32c65218.png?search=vscode&resizeSmall&width=1094)
安装完成验证:
3、vscode安装python插件
安装插件,将vscode与系统python关联起来;
者一个插件,会自动安装5个包:
python
Jupyter:Jupyter,Jupyter Keymap,Jupyter Notebook Renderers
Pylance
![](https://app.yinxiang.com/shard/s61/res/38b52a59-ed9d-4e57-8ede-10ea8bbe3db3.png?search=vscode&resizeSmall&width=1094)
4、调试;
脚本测试:
![](https://app.yinxiang.com/shard/s61/res/a7151680-72b3-449c-854f-f857d3b97290.png?search=vscode&resizeSmall&width=1094)
python debug:
设置断点;
![](https://app.yinxiang.com/shard/s61/res/69f03e67-35c6-4c0d-9cf6-ba2f64957a2a.png?search=vscode&resizeSmall&width=1094)