Upgrade to 20.2 fails on Windows Server 2019
See original GitHub issueEnvironment
- pip version:
20.2
- Python version:
3.[6-8]
- OS: Windows Server 2019 via GitHubActions
Description
pip
upgrade to 20.2
fails for Windows Server 2019. I’ve created a sample repository that runs pip install --upgrade
with "pip==20.1.1"
(old
) and "pip==20.2"
against all major platforms and Python 3.[6-8].
Note, that this is not a sudo
issue, since the upgrade to the previous version runs fine.
Expected behavior
Upgrade without failures.
How to Reproduce
pip install --upgrade "pip==20.2"
Output
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\pip-uninstall-q3fbhmha\\pip.exe'
Consider using the `--user` option or check the permissions.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Problem with in-place upgrade from Windows Server 2019 to ...
An in-place upgrade can be problematic and is never recommended. Better option is a clean install, patch fully, migrate roles over. You can ......
Read more >Windows server 2019 upgrade error - Microsoft Q&A
An in-place upgrade can fail for any number of reasons. Better option may be to stand up a new one, patch fully, migrate...
Read more >Server 2019 -> 2022 in place upgrade failure - Microsoft Q&A
I am trying to do an in place upgrade of a 2019 Windows Server to 2022. It is a DC and not much...
Read more >Step by Step Upgrade to Backup Exec 20.x, 21.x, or 22 - Veritas
1. Login to the Backup Server with the Backup Exec service account credentials. Open Windows Services MMC and review the Backup Exec serivces....
Read more >Oracle SQL Developer 20.2 crashes on Windows Server 2019
Hello, I have applied the latest Windows Security Updates on my VMWare VM Windows Server 2019.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes,
-m pip
is the generally preferred way to run pip. There are even talks to deprecate the pip command entirely, but that’d be a very long term project.Reading the implementation, the check (
pip._internal.utils.misc.protect_pip_from_modification_on_windows
) only guards against running throughpip.exe
(and the versioned variants), notpip
without the extension.git blame
led me to #7358, which removed the guard against the extension-lesspip
command since it mis-identifiespython path\to\repo\src\pip
as an error. The consensus seems to be that it is not worth the effort to improve the identification logic (my #7558 was closed unmerged), and pip should find a way to make this .exe replacement work, or deprecate the entry points altogether. So I’m closing this since the problem is tracked in #7567.