This is Visual Studio Code Workspace Template for Python3.
Click Use this template
from GitHub or download directly settings.json from this link.
New-Item .vscode -ItemType Directory
Invoke-WebRequest -Uri https://raw.githubusercontent.com/muneue-suwa/python3-workspace-template/master/.vscode/settings.json -OutFile .vscode/settings.json
mkdir .vscode
wget https://raw.githubusercontent.com/muneue-suwa/python3-workspace-template/master/.vscode/settings.json -O .vscode/settings.json
- Required: Pylance
- Optional: autoDocstring - Python Docstring Generator
Install Python virtual environment and select the interpreter from VSCode Command Palette (Ctrl+Shift+P
)
python -m venv .env
.env\Scripts\activate # (.env) will be shown
pip install -U pip
# And then Select Python Interpreter from VSCode Command Palette
If you use python virtual environment for the first time, execute the following command.
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
python -m venv .env
source .env/bin/activate # (.env) will be shown
pip install -U pip
# And then Select Python Interpreter from VSCode Command Palette
pip install -r requirements.txt # Install third-party libraries from requirements.txt
pip freeze | Out-File -Encoding UTF8NoBOM requirements.txt # Export libraries list to requirement.txt
pip install -r requirements.txt # Install third-party libraries from requirements.txt
pip freeze > requirements.txt # Export libraries list to requirement.txt