Skip to content

Instantly share code, notes, and snippets.

@josemarcosrf
Created May 22, 2020 16:55
Show Gist options
  • Select an option

  • Save josemarcosrf/427406d516850a0792e96d4d1657f6a1 to your computer and use it in GitHub Desktop.

Select an option

Save josemarcosrf/427406d516850a0792e96d4d1657f6a1 to your computer and use it in GitHub Desktop.
Utilities to analyse python dependencies

Draw a graph of dependencies

pydeps: Python module dependency visualization

# Draw a graph for <package> with max depth of 3 and cluster expernal deps. Produces an .svg file
pydeps <my-package> 
  --noshow \
  --max-bacon 3 \
  --cluster \
  --reverse

pip dependencies

pipdeptree: is a command line utility to display the installed python packages in form of a dependency tree

# Check all libraries that require `torchtext`
pipdeptree --reverse --packages torchtext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment