### 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

module.exit_json(changed=changed, cmd=pkg_cmd, stdout=out, stderr=err)
        out_freeze_before = None
        if requirements or has_vcs:
            dummy, out_freeze_before, dummy = _get_packages(module, pip, chdir)
        rc, out_pip, err_pip = module.run_command(cmd, path_prefix=path_prefix, cwd=chdir)
        out += out_pip
        err += err_pip
        if rc == 1 and state == 'absent' and \
           ('not installed' in out_pip or 'not installed' in err_pip):
            pass  
        elif rc != 0:
            _fail(module, cmd, out, err)
        if state == 'absent':
            changed = 'Successfully uninstalled' in out_pip
        else:
            if out_freeze_before is None:
                changed = 'Successfully installed' in out_pip
            else:
                dummy, out_freeze_after, dummy = _get_packages(module, pip, chdir)
                changed = out_freeze_before != out_freeze_after
        changed = changed or venv_created
        module.exit_json(changed=changed, cmd=cmd, name=name, version=version,
                         state=state, requirements=requirements, virtualenv=env,
                         stdout=out, stderr=err)
    finally:
        if old_umask is not None:
            os.umask(old_umask)
if __name__ == '__main__':
    main()