Skip to content

Instantly share code, notes, and snippets.

@lexavey
Last active September 25, 2022 06:59
Show Gist options
  • Save lexavey/57f6992b85729c8e66cec8f5f77d3b09 to your computer and use it in GitHub Desktop.
Save lexavey/57f6992b85729c8e66cec8f5f77d3b09 to your computer and use it in GitHub Desktop.
generate requirements.txt python
For python3: (I have both python 2 and 3 on my machine, where python2 is the default)
# install
pip3 install pipreqs
# Run in current directory
python3 -m pipreqs.pipreqs .
python2:
pip install pipreqs
python -m pipreqs.pipreqs .
To check your python version:
python --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment