### Summary

Use of `pkg_resources` is [deprecated](https://github.com/pypa/setuptools/pull/3843) as of `setuptools` version [67.5.0](https://setuptools.pypa.io/en/stable/history.html#v67-5-0).

https://github.com/ansible/ansible/blob/0371ea08d6de55635ffcbf94da5ddec0cd809495/lib/ansible/modules/pip.py#L277-L284

### Issue Type

Feature Idea

### Component Name

pip module

'''Return results of pip command to get packages.'''
    
    command = pip + ['list', '--format=freeze']
    locale = get_best_parsable_locale(module)
    lang_env = {'LANG': locale, 'LC_ALL': locale, 'LC_MESSAGES': locale}
    rc, out, err = module.run_command(command, cwd=chdir, environ_update=lang_env)
    
    if rc != 0:
        command = pip + ['freeze']
        rc, out, err = module.run_command(command, cwd=chdir)
        if rc != 0:
            _fail(module, command, out, err)
    return ' '.join(command), out, err
def _is_present(module, req, installed_pkgs, pkg_command):
    '''Return whether or not package is installed.'''
    for pkg in installed_pkgs:
        if '==' in pkg:
            pkg_name, pkg_version = pkg.split('==')
            pkg_name = Package.canonicalize_name(pkg_name)
        else:
            continue
        if pkg_name == req.package_name and req.is_satisfied_by(pkg_version):
            return True
    return False
def _get_pip(module, env=None, executable=None):