Skip to content

Instantly share code, notes, and snippets.

@rohitdavas
Created April 12, 2023 08:36
Show Gist options
  • Save rohitdavas/36bb65a0033568fb77965bfd1ad11618 to your computer and use it in GitHub Desktop.
Save rohitdavas/36bb65a0033568fb77965bfd1ad11618 to your computer and use it in GitHub Desktop.
creating a requirements.txt for python
# the package you need is pipreqs
pip install pipreqs
# they have a number of arguments. the most useful i found
# is the argument allowing you to check your package on pypi server.
# this fixed bugs in the requriements.txt packages. e.g skimage is not a package, but pipreqs was listing it down
# another is the version number listed by the pipreqs might be messed up.
python -m pipreqs.pipreqs . --force --mode gt --pypi-server https://pypi.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment