If deleting the installed Python version affects the further use of any virtual environment depends wether option symlinks
or copies
was used when the virtual environment was created.
From Python docs for module venv
, Creating virtual environments:
It also creates a bin
(or Scripts on Windows) subdirectory containing a copy/symlink of the Python binary/binaries (as appropriate for the platform or arguments used at environment creation time).
Emphasis mine, to note that the role of the installed Python version depends on options.
The installed Python version is still a dependency, when at the time of creation symlinks have been used. If copies have been used, then the virtual environment is independent of the Python installed version and it can be removed.
See the options:
--symlinks
Try to use symlinks rather than copies, when symlinks
are not the default for the platform.
--copies
Try to use copies rather than symlinks, even when
symlinks are the default for the platform.
See also: PEP 405: Copies versus symlinks