Skip to content

Instantly share code, notes, and snippets.

@andrewpetrochenkov
Last active April 14, 2025 11:01
Show Gist options
  • Save andrewpetrochenkov/7e40cf804ad3b3decfe924300ef72943 to your computer and use it in GitHub Desktop.
Save andrewpetrochenkov/7e40cf804ad3b3decfe924300ef72943 to your computer and use it in GitHub Desktop.
python requirements.txt #python #requirements.txt
# pipreqs (pip install pipreqs)
pipreqs --no-follow-links --force --print .
pipreqs --no-follow-links --force --print . | awk -F= '{print $1}' | grep -v ^configurations | grep -v ^$ > requirements.txt
sort --ignore-case -u -o requirements.txt{,}
# requirements.txt requirements.txt
python3 -m pip install -r requirements.txt
python3 -m pip install --break-system-packages -r requirements.txt
python3 -m pip --isolated install -r requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment