Upgrade pip deletes pip when executing from the Scripts folder #10505
Labels
C: upgrade
The logic of upgrading packages
OS: windows
Windows specific
type: bug
A confirmed bug or unintended behavior
Description
When I upgrade pip using a freshly installed Python 3.9.7 environment in a command prompt from the Scripts folder, the upgrade fails, the Scripts folder is emptied and the pip module is removed as well.
Below you will find "Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird". This translates to "The process cannot access the file, since it is used by another process".
I am used to do all upgrades of pip modules from within the Scripts folder. Because of this I use "..\python.exe" to run Python from there.
When I execute "python.exe -m pip install -U pip" from the Python39 folder, then the upgrade succeeds on a fresh Python installation. So it points to as if pip tries to delete the Scripts folder and then rename the ~cripts folder that it has created during the install process. Why does pip not copy the contents of ~cripts to the emptied folder Scripts? Such my kind of upgrading pip would work as it used to work earlier.
Expected behavior
A normal upgrade of pip from version 21.2.3 to 21.2.4 (or whatever is the most recent version).
pip version
21.2.3
Python version
3.9.7
OS
Windows 10
How to Reproduce
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: