一、
Anacond 下载与安装
选择适合的本机系统环境和版本。
二、VSCode 下载与安装
下载地址:
https://code.visualstudio.com/Download

安装:
直接勾选下一步,下一步即可。
三、环境配置
(1)创建python环境。Anaconda有自身的base环境,可以根据需要自己新建tensorflow环境。
(2)配置VSCode。
①安装中文插件。安装完VSCode后,开始是纯英文的,可以下载中文插件,设置成中文。
点击左边图标,在搜索框里面搜索Chinese。
安装后重启一遍VSCode。

有些较高版本的VSCode安装后,首次打开会自动弹出“是否安装中文插件”的弹窗。
②安装python插件。
输入Python,搜索Python插件,点击安装。

这个插件可以帮我们做很多事,暂时没弄懂,只需要使用一个功能即可。
③选择python环境。
在py文件界面按住
Ctrl+Shift+P
,即可跳出一个搜索框,输入 select interpreter。弹出如下页面后,点击Python:选择解释器。

弹出如下页面后,请自行选择自己想要的anaconda环境。

最后,可以实现在VSCode运行python项目文件。