Skip to content

Instantly share code, notes, and snippets.

@parwatcodes
Created February 23, 2025 22:15
Show Gist options
  • Save parwatcodes/6f044e4493b97bf2dfe04c56e5ed9bd8 to your computer and use it in GitHub Desktop.
Save parwatcodes/6f044e4493b97bf2dfe04c56e5ed9bd8 to your computer and use it in GitHub Desktop.
python install new env
mkdir project_dir
cd project_dir
python3 -m venv env
// activate the virtual env
source env/bin/activate
pip list // to list the dependencies for project
pip install <dependency_name>
pip freeze > requirements.txt (can be any name)
// to install dependency from file
pip install -r requirements.txt
// deactivate the env
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment