question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to 20.2 fails on Windows Server 2019

See original GitHub issue

Environment

  • 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:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Jul 29, 2020

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.

0reactions
uranusjrcommented, Jul 29, 2020

Reading the implementation, the check (pip._internal.utils.misc.protect_pip_from_modification_on_windows) only guards against running through pip.exe (and the versioned variants), not pip without the extension. git blame led me to #7358, which removed the guard against the extension-less pip command since it mis-identifies python 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found