Skip to content

Instantly share code, notes, and snippets.

@mkrause-nps
Last active September 20, 2023 18:48
Show Gist options
  • Save mkrause-nps/ddad1fc009a3479f86e29dec83208188 to your computer and use it in GitHub Desktop.
Save mkrause-nps/ddad1fc009a3479f86e29dec83208188 to your computer and use it in GitHub Desktop.
Using `virtualenv` on Windows 10

Use virtualenv on Windows 10

You need to have the utility virtualenv installed on our system (see my other gist).

Create virtual environment

Suppose you want to name your virtual environment .venv. Run

virtualenv --python '<absolute-path-to-Python-executable>/python.exe' .venv

Activate the virtual environment

In the directory where your .venv resides, run

.\.venv\Scripts\Activate.ps1

Deactivate the virtual environment

In the directory where your .venv resides, run

deactivate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment