[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-10-07 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-10-07 Thread miss-islington


miss-islington  added the comment:


New changeset 06935bd68e3d89a4cc3f08c1d15eaa651b79a523 by Miss Islington (bot) 
in branch '3.9':
bpo-45337: Use the realpath of the new executable when creating a venv on 
Windows (GH-28663)
https://github.com/python/cpython/commit/06935bd68e3d89a4cc3f08c1d15eaa651b79a523


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-10-07 Thread miss-islington


miss-islington  added the comment:


New changeset eabca6e593269301a0b7a36c4dc3525f04f5bb36 by Miss Islington (bot) 
in branch '3.10':
bpo-45337: Use the realpath of the new executable when creating a venv on 
Windows (GH-28663)
https://github.com/python/cpython/commit/eabca6e593269301a0b7a36c4dc3525f04f5bb36


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-10-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27130
pull_request: https://github.com/python/cpython/pull/28811

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-10-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 6811fdaec825bd6ab64e358a4b480108f5634d2d by Steve Dower in branch 
'main':
bpo-45337: Use the realpath of the new executable when creating a venv on 
Windows (GH-28663)
https://github.com/python/cpython/commit/6811fdaec825bd6ab64e358a4b480108f5634d2d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-10-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27129
pull_request: https://github.com/python/cpython/pull/28810

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +27028
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28663

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Steve Dower


Steve Dower  added the comment:

Thanks Adam.

This analysis is correct, and I think there are two parts to this.

First, we probably need to add an os.path.realpath(path_to_venv) before we try 
and launch the environment. We *could* limit this to when it's under AppData, 
but I think limiting it to Windows is enough.

Second, if the realpath generated a different path, we should warn the caller. 
That wouldn't have helped in this (programmatic) case, but at least if someone 
is looking at the output they'll get an important hint.

(The docs describing this behaviour are at 
https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
 )

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Adam Yoblick


Change by Adam Yoblick :


--
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Adam Yoblick


New submission from Adam Yoblick :

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com