Is there an ldd like command for python

Solution 1:

There are several packages that analyze code dependencies:

https://docs.python.org/2/library/modulefinder.html

Modulefinder seems like what you want, and reports what modules can't be loaded. It looks like it works transitively from the example, but I am not sure.

https://pypi.org/project/findimports/

This also analyzes transitive imports, I am not sure however what the output is if a module is missing.

... And some more you can find with your favorite search engine