Get all modules/packages used by a python project

前端 未结 2 1520
广开言路
广开言路 2020-12-04 12:52

I have a python GUI application. And now I need to know what all libraries the application links to. So that I can check the license compatibility of all the libraries.

2条回答
  •  情话喂你
    2020-12-04 13:13

    Install yolk with:

    pip install yolk
    

    Call the following to get the list of eggs in your environment:

    yolk -l
    

    Alternatively, you can use snakefood for graphing your dependencies, as answered in this question.

    You could try going into the site-packages folder where the unpacked eggs are stored, and running this:

    ls -l */LICENSE*
    

    That will give you a list of the licence files for each project (if they're stored in the root of the egg, which they usually are).

提交回复
热议问题