invl / pip-autoremove

Remove a package and its unused dependencies.
Other
620 stars 42 forks source link

pip-autoremove --freeze #12

Closed csala closed 3 years ago

csala commented 6 years ago

This is a feature request: The pip-autoremove -L option prints out a set of packages which happens to be the minimum necessary to reproduce an exact environment. However, this output does not match the pip freeze output format which is used to create requirements.txt files.

Would it be possible to add a --freeze option which performed the same as pip-autoremove -L but using the pip freeze format (i.e. package==version).

csala commented 6 years ago

As a remark, the same output can be obtained doing something like the following:

pip-autoremove -L | cut -d' ' -f1,2 | sed 's/ /==/'

However, installing the option which I suggested might be a bit more convenient.

csala commented 3 years ago

Oh, I had totally forgotten about this issue. Thanks for implementing it @invl and @tresni !