Skip to content

Instantly share code, notes, and snippets.

@mkeneqa
Last active August 16, 2021 23:08
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 mkeneqa/c147be0ef28260c96a25f2adaca0db9b to your computer and use it in GitHub Desktop.
Save mkeneqa/c147be0ef28260c96a25f2adaca0db9b to your computer and use it in GitHub Desktop.

QuickStart: Python Virtual Env

  1. Create python virtual environment:
    • UNIX: python3 -m venv env
    • WINDOWS: py -m venv env
  2. Activate Environment:
    • UNIX: source env/bin/activate
    • WINDOWS: .\env\Scripts\activate
  3. Optional: python -m pip install --upgrade pip
  4. python -m pip install -r requirements.txt
  5. Optional: To deactivate virtual environment;
    • UNIX: within the project directory type deactivate
    • WINDOWS: venv\Scripts\deactivate.bat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment