Skip to content

Instantly share code, notes, and snippets.

@GhostofGoes
Created January 25, 2019 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GhostofGoes/1605b92d418d88306c798c423c1564c2 to your computer and use it in GitHub Desktop.
Save GhostofGoes/1605b92d418d88306c798c423c1564c2 to your computer and use it in GitHub Desktop.
Create Python virtual environments on Windows and Linux with Virtualenv

Linux/OSX (Bash)

python -m pip install --user -U virtualenv
mkdir -p ~/.virtualenvs/
python -m virtualenv ~/.virtualenvs/getmac
source ~/.virtualenvs/getmac/bin/activate

Windows (PowerShell)

python -m pip install --user -U virtualenv
New-Item -ItemType directory -Path "$Env:USERPROFILE\.virtualenvs"
python -m virtualenv "$Env:USERPROFILE\.virtualenvs\getmac"
$Env:USERPROFILE\.virtualenvs\getmac\Scripts\Activate.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment