Skip to content

Instantly share code, notes, and snippets.

@ryanbehdad
Created June 29, 2020 06:32
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 ryanbehdad/038a540b43d13e80474fc3544dedf633 to your computer and use it in GitHub Desktop.
Save ryanbehdad/038a540b43d13e80474fc3544dedf633 to your computer and use it in GitHub Desktop.
Python venv cheat sheet

Python venv virtual environment cheat sheet

Create a venv

To create a virtual environment, go to the root of your project and run

python -m venv venv

It will create a virtual environment called venv

Activate venv

.\venv\Scripts\activate

Intall packages

pip install pandas pyodbc

Create requirements.txt

pip freeze > requirements.txt

Install packages 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