-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"pip.exe install --upgrade pip" fails on Windows (trying to move/delete running pip.exe) #3804
Comments
The usual workaround to this is |
And just to clarify, this is a limitation of Windows (you cannot replace a running executable) rather than of pip. |
And when running the command -m pip install --upgrade pip, make sure you are running command as administrator.
|
Duplicate of the old #1299 |
Error did not disappear after having a pip install script. According to pypa/pip#3804 one just needs to update pip.
* work-a-round for: pypa/pip#3804 * use full path to ADMIN_FILE_NAME
For me this command works.->py -m pip install -U pygame --user
Search for cmd and Right click on cmd and do run as administrator.
Run the command, py -m pip install -U pygame --user, but before you run this command first of all make sure you configure your environment variables properly.
Type python in command prompt, this will take you to the python command line which will look like this ">>>".If not then you have a problem with your system variables.
Make sure you are in python command line and then type import pygame,and after this press ctrl+z and enter that will take you out from python command line.
Make sure you are not in python command line and then run this command py -m pygame.examples.aliens,if the game starts then congrats you are done. |
This pip upgrade upgrade will fail on Windows. The following issue explains the situation and the workaround proposed: pypa/pip#3804
* The directory dcos_build_venv must be deleted only if it already exists. * Fix pip upgrade. The following issue explains the situation and the proposed workaround proposed: pypa/pip#3804
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
Pip upgrade using
pip.exe install --upgrade pip
fails and leave python pip broken (pip.exe
remains, butpip-script.py
was deleted).AFAIK upgrade fail because it is trying to delete
pip.exe
which is currently running. IMHO for a pip upgrade this step should be skipped as it will point to the samepip-script.py
after re-install.Fixing broken pip:
The broken pip caused by the failed upgrade can be fixed by running:
What I've run:
Notes that below I run the command
Scripts\pip.exe install --upgrade pip
to make the issue more obvious. Typingpip install --upgrade pip
executes the same command.shutil.move is trying to copy/delete the executable as it is on a different drive than the TEMP directory.
The text was updated successfully, but these errors were encountered: