'For a given package, returns a list of required packages. Recursive.'

def get_deps_list(self, pkg_name, installed_distros=None):

    import pip
    deps = []
    if (not installed_distros):
        installed_distros = pip.get_installed_distributions()
    for package in installed_distros:
        if (package.project_name.lower() == pkg_name.lower()):
            deps = [(package.project_name, package.version)]
            for req in package.requires():
                deps += self.get_deps_list(pkg_name=req.project_name, installed_distros=installed_distros)
    return list(set(deps))
