Skip to content

Instantly share code, notes, and snippets.

@matthewdeanmartin
Last active July 22, 2024 20:47
Show Gist options
  • Save matthewdeanmartin/f410b0e1965196f5365376d5481626dc to your computer and use it in GitHub Desktop.
Save matthewdeanmartin/f410b0e1965196f5365376d5481626dc to your computer and use it in GitHub Desktop.
  1. Poetry:

    poetry shell
  2. Python venv:

    source venv/bin/activate  # On Unix or MacOS
    .\venv\Scripts\activate  # On Windows
  3. virtualenv:

    source myenv/bin/activate  # On Unix or MacOS
    .\myenv\Scripts\activate  # On Windows
  4. virtualenvwrapper:

    workon myenv
  5. Direct path modification:

    export PATH="/path/to/venv/bin:$PATH"  # On Unix or MacOS
    set PATH=C:\path\to\venv\Scripts;%PATH%  # On Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment