Niklas Rosenstein <rosensteinnik...@gmail.com> added the comment:
I just encountered the same behavior. Steps to reproduce: * Install Python 3 (I used 3.9.5) on Windows * Use the Admin console to create a python3.exe link, e.g. cd "c:/Users/niklas/AppData/Local/Programs/Python/Python39" mklink python3.exe python.exe * Use python3.exe to create a venv, e.g. python3 -m venv The environment is created up until the point _setup_pip() is called in venv, which causes the following error to be printed: Error: [WinError 2] The system cannot find the file specified Running venv from the interpreter gives the full stack trace. $ python3 -c 'import venv; venv.main([".venv"])' Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\niklas\AppData\Local\Programs\Python\Python39\lib\venv\__init__.py", line 491, in main builder.create(d) File "C:\Users\niklas\AppData\Local\Programs\Python\Python39\lib\venv\__init__.py", line 75, in create self._setup_pip(context) File "C:\Users\niklas\AppData\Local\Programs\Python\Python39\lib\venv\__init__.py", line 299, in _setup_pip subprocess.check_output(cmd, stderr=subprocess.STDOUT) File "C:\Users\niklas\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\niklas\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "C:\Users\niklas\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\niklas\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified ---------- nosy: +n_rosenstein _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43749> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com