How does venv work: it inserts the path to the python.exe into PATH environment variable and replaces the path to site-packages from global environment with the path to site-packages in the created env.
I understand that copying of site-packages is necessary and allows to isolate the environment. It also copies python.exe, as far as I understand, in order not to depend on the global python interpreter.
But why do we need to copy python.exe if it does not copy standart packages from PythonLib?
If I want to use the created virtual env on the computer without python installed, I couldn’t do that because there are no standart libraries there.
So I think that copying of python.exe and not copying of standart packages are half-mesures and make no sence. Or I don’t understand correctly the goal of copying of python.exe?
Шафаренко Денис is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.