Skip to content

Instantly share code, notes, and snippets.

@mikecharles
Created April 11, 2024 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikecharles/2f8e2b534b34cb958ea63eef49134ddb to your computer and use it in GitHub Desktop.
Save mikecharles/2f8e2b534b34cb958ea63eef49134ddb to your computer and use it in GitHub Desktop.
Get all Python dependencies for a Python application

To get a unique list of all Python packages your application depends on:

grep -irhP '^import ' interp_stn_to_grid | sort | uniq

where interp_stn_to_grid is the top-level directory containing all the Python scripts in your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment