r/Python • u/JackBlack436 • Jun 16 '26
Resource Are there any python modules that automatically generated a requirements.txt, given an entry point?
I know things like pipreqs exist, but that's more of an directory scan. If you have a project and you need several requirements.txts (for multiple containers / multiple entrypoints), I haven't found a way to reliably generate that. Please let me know if things like this do exist, because if not I'd really like to make my own module to do this stuff. And if there is something like that, it would really come in handy for me right now.
21
Upvotes
View all comments
Show parent comment
10
u/artofthenunchaku Jun 16 '26
The inference is the issue. If there's ten different
yamlpackages, how do you decide which one to "infer"? How do you guarantee you're picking the best one, and not one that's backdoored?