How can I set up a virtual environment for Python in Visual Studio Code?

PHOTO EMBED

Sun Aug 08 2021 00:11:24 GMT+0000 (UTC)

Saved by @RyanJ

# Then open Python Terminal (Ctrl + Shift + P: Python: Create Terminal)

# cd to the workspace

# In the terminal:

py -m venv venv

# Then ctrl + shift + P: Python: Select Interpreter

# Then select entire workspace

# Then select C:\Code\venv\Scripts\python.exe, where 'Code' is the workspace

# Then create new Python terminal
content_copyCOPY

https://stackoverflow.com/questions/54106071/how-can-i-set-up-a-virtual-environment-for-python-in-visual-studio-code