Skip to content

Upgrading to 10.0 on Windows breaks pip.exe #5241

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

Closed
BeatButton opened this issue Apr 15, 2018 · 3 comments
Closed

Upgrading to 10.0 on Windows breaks pip.exe #5241

BeatButton opened this issue Apr 15, 2018 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR

Comments

@BeatButton
Copy link

BeatButton commented Apr 15, 2018

  • Pip version: 9.0.3
  • Python version: Python 3.6.5
  • Operating system: Windows 10 x64 v1709

Description:

I'm trying to upgrade pip from 9.0.3 to 10.0.0. The minimum reproducible steps I've taken are:

  1. Install Python 3.6.5 for all users in default location (C:\Program Files\Python36)
  2. Start command prompt as administrator, run pip install -U pip
  3. Afterwards, pip.exe is broken, but py -mpip is functional

What I've run:

Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Windows\system32>pip install -U pip
Collecting pip
  Using cached pip-10.0.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Exception:
Traceback (most recent call last):
  File "c:\program files\python36\lib\shutil.py", line 387, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\thebe\\AppData\\Local\\Temp\\pip-rcioww3v-uninstall\\program files\\python36\\scripts\\pip.exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 215, in main
  File "c:\program files\python36\lib\site-packages\pip\commands\install.py", line 342, in run
  File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 795, in install
  File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 767, in commit_uninstall
  File "c:\program files\python36\lib\site-packages\pip\req\req_uninstall.py", line 142, in commit
  File "c:\program files\python36\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "c:\program files\python36\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "c:\program files\python36\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "c:\program files\python36\lib\site-packages\pip\_vendor\six.py", line 686, in reraise
  File "c:\program files\python36\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
  File "c:\program files\python36\lib\shutil.py", line 494, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "c:\program files\python36\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\program files\python36\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\program files\python36\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\program files\python36\lib\shutil.py", line 389, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\thebe\\AppData\\Local\\Temp\\pip-rcioww3v-uninstall\\program files\\python36\\scripts\\pip.exe'

C:\Windows\system32>pip
Fatal error in launcher: Unable to create process using '""c:\program files\python36\python.exe"  "C:\Program Files\Python36\Scripts\pip.exe" -V'

C:\Windows\system32>py -mpip -V
pip 10.0.0 from C:\Program Files\Python36\lib\site-packages\pip (python 3.6)
@pradyunsg
Copy link
Member

Hey @BeatButton!

This issue is a duplicate of #5223 -- if so, please close this to keep things easier to keep track of.

@pradyunsg pradyunsg added the resolution: duplicate Duplicate of an existing issue/PR label Apr 15, 2018
@BeatButton
Copy link
Author

Whoops

@lock
Copy link

lock bot commented Jun 2, 2019

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.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants