问题
For nodejs there seems to be a very straightforward way to list all used modules and their licenses. Why is there no similar tool for python?
What I've found so far is pip-licenses which is pretty intuitive but has the flaw that it outputs all installed pip modules and not just the ones I actually imported in an actual project.
Another option might be to write a script that first searches for imported modules in my scripts by using modulefinder and then iterates over that list using pkg_resources to get the licenses.
Isn't there an easier, cleaner way to do this? I'm sure this task has been done by thousands of coders all over the world before.
来源:https://stackoverflow.com/questions/61662812/is-there-a-python-library-that-documents-all-modules-and-licenses-used-in-a-scri