vscode上手Python
时间:2021-09-16 10:33:30
收藏:0
阅读:20
Getting Started with Python in VS Code
-
安装Python Extension
-
选择一个Python解释器
2.1. 界面左下角左键点击选择一个Python解释器
2.2.ctrl+shift+P,typePython: Select Interpreter -
由于常常要导入外部模块PyPI,所以建议使用虚拟环境Environments
3.1. 创建虚拟环境
py -3 -m venv .venv3.2. 进入虚拟环境
.venv/scripts/activate3.3. 退出虚拟环境
deactivate -
创建.py文件并运行源文件
原文:https://www.cnblogs.com/sxrekord/p/vscode_getting_started_python.html
评论(0)