title: Windows Python (<=3.10.2) fails to run `python -m venv .venv`
body: <p><strong>This issue has been solved, resulted in a bug report to Python.org. See the my <a href="https://stackoverflow.com/a/71041562/4516027">self-answer below</a> for the workaround until it's fixed in a future release of Python</strong></p>
  <p>One of my PCs got bitten by this bug which no longer allows me to create venv with the error:</p>
  <pre><code>Error: Command '['C:\\Users\\kesh\\test\\.venv\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 101.
  </code></pre>
  <ul>
  <li>This issue has been known, chronologically: <a href="https://stackoverflow.com/questions/55433197/error-create-python-virtual-environment-win-10">v3.7.2</a>, <a href="https://stackoverflow.com/questions/61641280/python3-8-venv-returned-exit-status-101">v3.8</a>, <a href="https://stackoverflow.com/questions/61371606/returned-non-zero-exit-status-101-giving-an-error-when-i-tried-create-a-virtual">v3.?</a>, &amp; <a href="https://stackoverflow.com/questions/70670483/cannot-create-python-virtual-environment-exit-status-101">v3.10.1</a></li>
  <li>The only known solution is to give up per-user install and use global install by checking &quot;Install for all users&quot; option</li>
  </ul>
  <p>I'm trying to figure out what exactly is happening, but quickly running out of ideas. Here are what I've tried so far:</p>
  <ul>
  <li>On my PC, &quot;Install for all users&quot; works as well as per-user install on a dummy account (all using the same v3.10.2 installer). This singles out the issue to be on my Windows account. Changing the install location does not help.</li>
  <li>Went into <code>venv</code> source by running Python with <code>venv.main(args=('.venv',))</code>, debugging line-by-line and noted that it copies <code>Lib\venv\scripts\nt\python.exe</code> from the python install dir to the local <code>.venv\Scripts</code> folder using <code>shutil.copyfile()</code>.</li>
  <li>If I run the original <code>Lib\venv\scripts\nt\python.exe</code> in command prompt, it runs with a message <code>No pyvenv.cfg file</code> (which makes sense as the .cfg file is in <code>.venv</code> folder which it couldn't see)</li>
  <li>If I call the copied <code>.venv\Scripts\python.exe</code> then it returns an error <code>Unable to create process using 'C:\Users\kesh\AppData\Local\Programs\Python\Python310\python.exe'</code> (note that the <code>python.exe</code> path for the process is that of the installed Python exe)</li>
  <li>If <code>.venv</code> is installed successfully (on the dummy Windows account), the above run starts a Python session as you'd expect.</li>
  <li><code>venv\scripts\nt\python.exe</code> is different from the standard <code>python</code> binary and verified that this file and its source in <code>venv\Scripts\nt</code> are identical.</li>
  <li>All this points to that something in my account configuration is bothering the <code>.venv\Scripts\python.exe</code> to do the right thing, but my environmental variables are pretty clean and python paths are at the top of the user PATH variable.</li>
  <li>Currently trying to locate the source code of <code>.venv\Scripts\python.exe</code> but not found it yet.</li>
  <li>Can it be something in registry?</li>
  </ul>
  <p>If you have any other ideas to try, please share.</p>
  <p>Update #1:</p>
  <ul>
  <li>Found the source of the error message <code>PC/launcher.c</code> Line 814</li>
  <li>Possibility: <code>CreateProcessW(NULL, cmdline,...</code> where <code>cmdline</code> is the original python path in the error message, without quote. <a href="https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw" rel="nofollow noreferrer">CreateProcessW documentation</a> states executable name is deduced from the first white space–delimited token in the <code>cmdline</code> string. Though I replaced my actual account name with <code>kesh</code> it actually comprises two words and a space...</li>
  </ul>
  <p>Update #2:</p>
  <p>Solution found as posted below</p>