用vscode写python

一、安装anaconda

详见我的另一篇博客 python开发环境配置

二、安装vscode

下载地址 https://code.visualstudio.com/Download# (User Installer是为当前用户安装,System Installer是为系统所有用户安装); 安装过程中把能勾选的尽量都勾上

三、在vscode中安装python插件

打开vscode后单击左侧栏中的 ,或使用"ctrl+shift+x"快捷键,进入“Extensions”页面

搜索python,然后install

扫描二维码关注公众号,回复: 12398472 查看本文章

一些建议进行的配置:

①点击“View→Command Palette”或使用Ctrl+Shift+P快捷键打开Command Palette,搜索选择"Python: Select Interpreter",选择合适的python解释器

②点击“View→Command Palette”或使用Ctrl+Shift+P快捷键打开Command Palette,搜索选择"Terminal: Select Default Shell",根据自己的习惯来选terminal,我习惯用cmd

③左下角→Settings→搜索“activate”→将这一项的勾选去掉

然后新建py文件,右键选择就可以跑了。

猜你喜欢

转载自blog.csdn.net/yuejisuo1948/article/details/102535142