Skip to content

Instantly share code, notes, and snippets.

@megpay
Created February 6, 2023 17:13
Show Gist options
  • Save megpay/be0bf03384dd9777322d404a7fae9603 to your computer and use it in GitHub Desktop.
Save megpay/be0bf03384dd9777322d404a7fae9603 to your computer and use it in GitHub Desktop.
Create, check, activate, and delete virtual environments
# create a virtual env called myvirtualenv
virtualenv myvirtualenv
# activate the virtual environment and install everything from requirements
source myvirtualenv/bin/activate
pip install -r requirements.txt
# check which venv you are in
which python
# deactivate the venv
deactivate
# remove the venv
sudo rm -rf myvirtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment