How to get only the used pip packages?

Viewed 684

I'm aware of pip freeze and pip list, but how do I output the packages used in a specific python file to a requiremants.txt file?

Is there an option to specify a file?

1 Answers
Related