### Summary

Ansible devel sanity tests failing with error: packaging Python module unavailable; unable to validate the collection

### Issue Type

Bug Report

### Component Name

ansible sanity tests

### Ansible Version

```console
$ ansible devel
```


### Configuration

```console
$ ansible-config dump --only-changed
```


### OS / Environment

mac os

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```
Ansible devel sanity tests is failing with `stderr: [WARNING]: packaging Python module unavailable; unable to validate collection`. Plz ref the below test failures:
[ansible-test-sanity-docker-devel](https://dashboard.zuul.ansible.com/t/ansible/build/ffc5d7c618a740bf9c783e15c2d14806)
[network-ee-sanity-tests](https://dashboard.zuul.ansible.com/t/ansible/build/b4ab02b51d76487b97356f3c6ffe76fe)

### Expected Results

Ansible sanity tests run without failure for `devel`

### Actual Results

```console
Ansible sanity tests fail for `devel`
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
try:
                cmd = [external_python, yaml_to_json_path]
                proc = subprocess.Popen([to_bytes(c) for c in cmd],  
                                        stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                stdout_bytes, stderr_bytes = proc.communicate(to_bytes(yaml))
                if proc.returncode != 0:
                    raise Exception('command %s failed with return code %d: %s' % ([to_native(c) for c in cmd], proc.returncode, to_native(stderr_bytes)))
                data = yaml_to_dict_cache[content_id] = json.loads(to_text(stdout_bytes), object_hook=object_hook)
                return data
            except Exception as ex:
                raise Exception('internal importer error - failed to parse yaml: %s' % to_native(ex))
        _collection_finder._meta_yml_to_dict = yaml_to_dict  
        collection_loader = _AnsibleCollectionFinder(paths=[collection_root])
        
        collection_loader._install()  
    else:
        
        collection_loader = None
    
    list(map(sys.modules.pop, [m for m in sys.modules if m.partition('.')[0] == ansible.__name__ and m != vendor_module_name]))
    if import_type == 'module':
        
        
        
        ansible_module = types.ModuleType(ansible.__name__)
        ansible_module.__file__ = ansible.__file__
        ansible_module.__path__ = ansible.__path__
        ansible_module.__package__ = ansible.__package__
        sys.modules[ansible.__name__] = ansible_module
    class ImporterAnsibleModuleException(Exception):