New submission from Adam Yoblick <adam.yobl...@microsoft.com>:

Repro steps:

1. Install Python 3.9 from the Microsoft Store
2. Try to create a virtual environment under the userappdata folder, using a 
command line similar to the following:

"C:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\python3.9.exe"
 -m venv "C:\Users\advolker\AppData\Local\Microsoft\CookiecutterTools\env"

3. Observe the following error:

Error: Command 
'['C:\\Users\\advolker\\AppData\\Local\\Microsoft\\CookiecutterTools\\env\\Scripts\\python.exe',
 '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit 
status 106.

Note that creating a venv without pip DOES work:

"C:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\python3.9.exe"
 -m venv "C:\Users\advolker\AppData\Local\Microsoft\CookiecutterTools\env" 
--without-pip

BUT the venv is NOT at the specified location. This is because the Windows 
Store app creates a redirect when creating the venv, and that redirect is only 
visible from within the python executable.

This means that python doesn't respect the redirect when trying to install pip 
into the newly created venv.

----------
components: Windows
messages: 402983
nosy: AdamYoblick, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Create venv with pip fails when target dir is under userappdata using 
Microsoft Store python
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45337>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to