def requirements_packages_in_module(module, requirements=None):
    if (requirements is None):
        requirements = list(pip_licenses_df(include_module_name=False)['package_name'])
    elif (isinstance(requirements, str) and os.path.isfile(requirements)):
        with open(requirements) as fp:
            requirements = fp.read().splitlines()
    p = re.compile('^[^=]+')
    module_names = list()
    for x in requirements:
        try:
            xx = p.findall(x)
            if xx:
                module_name = get_module_name(xx[0])
                module_names.append(module_name)
        except Exception as e:
            print('Error with {}\n  {}'.format(x, e))
    return base_module_imports_in_module_recursive(module, module_names=requirements)
def requirements_packages_in_module(module, requirements=None):
    if (requirements is None):
        requirements = list(pip_licenses_df(include_module_name=False)['package_name'])
    elif (isinstance(requirements, str) and os.path.isfile(requirements)):
        with open(requirements) as fp:
            requirements = fp.read().splitlines()
    p = re.compile('^[^=]+')
    module_names = list()
    for x in requirements:
        try:
            xx = p.findall(x)
            if xx:
                module_name = get_module_name(xx[0])
                module_names.append(module_name)
        except Exception as e:
            print('Error with {}\n  {}'.format(x, e))
    return base_module_imports_in_module_recursive(module, module_names=requirements)