Error with mkvirtualenv python 3.9

I wasn't able to uncover anything about this in the forum, let me know if I am wrong. Error setting a virutalenv using 3.9. I am working with 3.10 for now though.

17:33 ~ $ mkvirtualenv uipvapp --python=/usr/bin/python3.9
    RuntimeError: failed to build image pip because:
    Traceback (most recent call last):
    File "/usr/local/lib/python3.10/site-packages/virtualenv/seed/embed/via_app_data/", line 57, in _install installer.install(creator.interpreter.version_info)
    File "/usr/local/lib/python3.10/site-packages/virtualenv/seed/embed/via_app_data/pip_install/", line 35, in install self._uninstall_previous_version()
    File "/usr/local/lib/python3.10/site-packages/virtualenv/seed/embed/via_app_data/pip_install/", line 151, in _uninstall_previous_version dist_name = self._dist_info.stem.split("-")[0]
    File "/usr/local/lib/python3.10/site-packages/virtualenv/seed/embed/via_app_data/pip_install/", line 115, in _dist_info raise RuntimeError(msg)  # pragma: no cover
    RuntimeError: no .dist-info at /home/justinfmccarty/.local/share/virtualenv/wheel/3.9/image/1/CopyPipInstall/pip-22.1.2-py3-none-any, has pip

17:34 ~ $ workon uipvapp
ERROR: Environment '/home/justinfmccarty/.virtualenvs/uipvapp' does not contain an activate script.

It looks like you may have broken install of virtualenv in your .local directory and that is what is causing that.

anyone solve this issue?

If the virtualenv is broken, I'd suggest reinstalling it.

You should be able to resolve this issue by removing /home/justinfmccarty/.local/share/virtualenv/wheel/3.9/ and attempting the creation of the virtual environment again as I've documented here