Message396286
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 |
|
Date |
User |
Action |
Args |
2021-06-21 19:56:39 | n_rosenstein | set | recipients:
+ n_rosenstein, vinay.sajip, Ian Norton |
2021-06-21 19:56:39 | n_rosenstein | set | messageid: <1624305399.5.0.744003658007.issue43749@roundup.psfhosted.org> |
2021-06-21 19:56:39 | n_rosenstein | link | issue43749 messages |
2021-06-21 19:56:39 | n_rosenstein | create | |
|