Skip to content

Instantly share code, notes, and snippets.

@HarishChandran3304
Created October 3, 2023 12:01
Show Gist options
  • Save HarishChandran3304/9bc078194e411b78341b4f5fc85bafbc to your computer and use it in GitHub Desktop.
Save HarishChandran3304/9bc078194e411b78341b4f5fc85bafbc to your computer and use it in GitHub Desktop.
Cheat sheet for python venv commands

Python Venv Cheat Sheet

Create a new venv:

$ python3 -m venv venv

Activate venv:

$ source ./venv/bin/activate

View intstalled packages:

$ pip list

Create requirements.txt:

$ pip freeze > requirements.txt

Install dependencies from requirements.txt:

$ pip install -r requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment