classification
Title: Scripts and binaries in PYTHON_PREFIX/Scripts contain unnecessarily lowercased path to Python location on Windows
Type: behavior Stage: resolved
Components: Distutils, Installation, Windows Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, vlad, zach.ware
Priority: normal Keywords:

Created on 2019-06-08 13:56 by vlad, last changed 2019-06-08 15:16 by vlad. This issue is now closed.

Messages (3)
msg345037 - (view) Author: Vlad Shcherbina (vlad) * Date: 2019-06-08 13:56
To reproduce:

1. Download and run Python installer (I used python-3.7.3-amd64-webinstall.exe).
2. Modify install settings:
   - Install for all users: yes
   - Customize install location: "C:\Python37"
   (don't know if it's relevant, mentioning it just in case)
3. Install.
4. Run the following commands:
    pip --version
    py -m pip --version

Expected result:

> pip --version
pip 19.0.3 from C:\Python37\lib\site-packages\pip (python 3.7)
> py -m pip --version
pip 19.0.3 from C:\Python37\lib\site-packages\pip (python 3.7)

Actual result:

> pip --version
pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7)
> py -m pip --version
pip 19.0.3 from C:\Python37\lib\site-packages\pip (python 3.7)


Same happens for all binaries and scripts in PYTHON_PREFIX/Scripts, not only for pip.exe.

For example, if I install pytest (using "pip install pytest" or "py -m pip install pytest", doesn't matter), I get the following:

> pytest -v
============================================================ test session starts ============================================================
platform win32 -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0 -- c:\python37\python.exe
cachedir: .pytest_cache
rootdir: C:\temp\qqq
collected 0 items
======================================================= no tests ran in 0.02 seconds ========================================================

> py -m pytest -v
============================================================ test session starts ============================================================
platform win32 -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0 -- C:\Python37\python.exe
cachedir: .pytest_cache
rootdir: C:\temp\qqq
collected 0 items
======================================================= no tests ran in 0.02 seconds ========================================================
msg345041 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-08 14:50
This is due to how the pip.exe launcher is generated, which is part of pip itself (actually distlib, I think, but someone over there can redirect).

Please report this at https://github.com/pypa/pip
msg345047 - (view) Author: Vlad Shcherbina (vlad) * Date: 2019-06-08 15:16
https://github.com/pypa/pip/issues/6582
History
Date User Action Args
2019-06-08 15:16:31vladsetmessages: + msg345047
2019-06-08 14:50:30steve.dowersetstatus: open -> closed
resolution: third party
messages: + msg345041

stage: resolved
2019-06-08 13:56:52vladcreate