Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Python Virtual Environment CreatorNew to Visual Studio Code? Get it now.
Python Virtual Environment Creator

Python Virtual Environment Creator

Carsten Engelke

|
42,632 installs
| (0) | Free
Create new Python virtual environment
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Create Python virtual environment

A list of commands to call in order to setup a clean virtual environment in Python. Attention: This will uninstall all packages and reinstall them after creating the virtual environment. Make sure Powershell is able to call signed scripts (e.g. by calling "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process" in an admin powershell window in beforehand). See https://code.visualstudio.com/docs/python/environments#_global-virtual-and-conda-environments for more info.

Requirements

Requires Python installation and setup of path variable. This script will simply call the following commands:

Set-Location -Path to working directory
pip freeze > _requirements.txt
pip uninstall -r _requirements.txt -y
python -m venv .venv
pip install -r _requirements.txt
.venv/Scripts/Activate.ps1

Known Issues

Release Notes

Only testet on Windows 10 so far.

1.0.0

Initial release.


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft