Auto generate requirements.txt for your python3 and python2 projects

I noticed when I used pip freeze it would output way more than I needed for requirements on my smaller python projects. After some looking around I found pipreqs in pip

pireqs can be installed using pip like so:
1.) pip install pipreqs
1.) python3 -m pip install pireqs

2.) pipreqs /path/to/project

In my use case, the command to run was.

[16:54 justin ~/code/justin-tmp (master *)]$ pipreqs .
INFO: Successfully saved requirements file in ./requirements.txt
[16:55 justin ~/code/justin-tmp (master)]$ cat requirements.txt 

Hopefully, this makes it easier to build when you, or myself need it in the future

comments powered by Disqus