[issue41925] Lowercase path to python.exe in pip.exe from venv is throwing error
New submission from Chris Tse : Following up on https://bugs.python.org/issue37369 as it was advised to open a new issue regarding case sensitivity. I am on Windows 10 running Version 10.0.19041 Build 19041. I am experiencing the same problem in that issue when using venv on Powershell. The path to python.exe in the pip.exe generated by venv is all lowercase, which is the source of this error. After activating the venv with Activate.ps1 and attempting to use pip, I get the following error, while activate.bat on cmd works fine: Fatal error in launcher: Unable to create process using '"c:\users\chris\code\project\myenv\scripts\python.exe" "C:\Users\chris\code\project\myenv\Scripts\pip.exe" ': The system cannot find the file specified. Full steps to reproduce: 1. Install Python 3.8.6 from python.org (ticking add to PATH option in installer) 2. Open Powershell (via both native Powershell app or the new Windows Terminal) and verify that `python` is bound to the correct Version 3. Run `python -m venv myenv` 4. Run `.\myenv\Scripts\Activate.ps1` 5. Run `pip` Expected behavior: Get the pip usage commands list Actual behavior: Get the above Fatal error Notes: I did not explicitly set case sensitivity on my machine. All my drives are formatted as NTFS, but should not be case sensitive, which can be confirmed by fsutils: > fsutil.exe file queryCaseSensitiveInfo C:\ Case sensitive attribute on directory C:\ is disabled. Attempting to actually call that python.exe using the full lowercase path throws a similar error. Someone I know who has been helping with debugging this ran the Scripts\activate script successfully on the same version of Powershell as mine (5.1.19041.1) which should be meant for use on bash. I however was not able to do so. -- components: Windows messages: 377916 nosy: chris-tse, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Lowercase path to python.exe in pip.exe from venv is throwing error versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue41925> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41925] Lowercase path to python.exe in pip.exe from venv is throwing error
Change by Chris Tse : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue41925> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41925] Lowercase path to python.exe in pip.exe from venv is throwing error
Chris Tse added the comment: UPDATE: After some further investigation, it seems like even on cmd and seeing the (myenv) indicator, it actually seems to be falling back to system pip and installing packages globally. Running `.\myenv\Scripts\pip.exe` actually throws that same error. CMD just seems to fallback to system pip and silently fails the desired venv pip, unlike Powershell. -- ___ Python tracker <https://bugs.python.org/issue41925> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41925] Lowercase path to python.exe in pip.exe from venv is throwing error
Chris Tse added the comment: Another update: After a full shutdown from yesterday and trying again today, everything seems to be working now, including activating the venv via: 1. python -m venv myenv 2. .\myenv\Scripts\activate (not Activate.ps1, though that work too, is this intended?) The only thing I can think of that changed since I opened the report was that I changed my system locale back to English (United States) from Japan (Japan). I did a system restart to make the changes take effect, but it didn't seem to fix the issue at the time. It could possibly be a difference between a shutdown vs a restart. Odd, either way. I wouldn't think that changing locales would have an effect on Windows paths being case sensitive or not, otherwise folks from other countries would be experiencing this error. Perhaps the mixing of locale and system language? I had locale set to Japan but system language set to English Thank you for taking the time to reply. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue41925> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com