Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'upgraded': 0.05; '(so': 0.07; 'sure)': 0.09; 'url:github': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; 'subject:error': 0.11; 'andreas': 0.16; 'conflicting': 0.16; 'created.': 0.16; 'executable.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'people:': 0.16; 'subject:after': 0.16; 'subject:permission': 0.16; 'url:issues': 0.16; 'url:pip': 0.16; 'wrote:': 0.16; 'skip': 0.18; 'windows': 0.20; 'permission': 0.20; 'skip:" 30': 0.20; 'fix': 0.21; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'am,': 0.23; 'appears': 0.23; '2015': 0.23; 'errors': 0.23; "i've": 0.24; 'header:In-Reply-To:1': 0.24; 'install': 0.25; 'installed': 0.26; 'message-id:@mail.gmail.com': 0.28; 'command': 0.28; 'itself,': 0.29; 'locks': 0.29; 'subject:upgrade': 0.29; 'workaround': 0.29; 'fri,': 0.31; 'run': 0.32; 'skip:_ 10': 0.32; 'problem': 0.33; 'recommended': 0.34; 'this?': 0.34; 'running': 0.34; 'file': 0.34; 'received:google.com': 0.34; 'fresh': 0.35; 'subject:: ': 0.37; '12,': 0.37; 'delete': 0.37; 'sure': 0.40; 'upgrading': 0.72; 'chrisa': 0.84; 'pip': 0.84; 'short-hand': 0.84; 'to:none': 0.90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=HHyOl3zg2s7+Vn/vlY0GuWvydJszvyXNv1ZDyO6JVp0=; b=A6RNgqice1z+oSRD+yU0Q0Y2bTCqGt8kS+y9qDKSnwQCjjaxTN5nRPi46Xwe4zsciw z9o3vYr6rhREsdnhCNLASMAnTSYvBbvINNAL03wCQ+/PG6BcplLqxE6sXJr2ADgBQapT 1bMN8cYPQ8a68NOjzZ/q5SWTzh3tcjN07wC3bWovgY1HJ3bTM5mY4e3Zqvb/ZQa0Kk8m kQ1tPvNMVTSuW2OUV7RxJfAAoVRGx8c06EwdEu7whrlMMpo+k5PSroP40tx8IVwbpQA8 HAq5FOIBzaQJQ7A73vgXguAFxtwpRrwCYcGzg6IODRn16dTmLgJmCTVLJbU2KyyOBpDM ZKnA== MIME-Version: 1.0 X-Received: by 10.107.134.218 with SMTP id q87mr4356664ioi.27.1434050149969; Thu, 11 Jun 2015 12:15:49 -0700 (PDT) In-Reply-To: References: Date: Fri, 12 Jun 2015 05:15:49 +1000 Subject: Re: Python 3.5.0b2 - permission error after pip upgrade From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434050159 news.xs4all.nl 2833 [2001:888:2000:d::a6]:36721 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92499 On Fri, Jun 12, 2015 at 4:57 AM, Andreas Balogh wrote: > I've installed a fresh copy of Python 3.5.0b2 and - as recommended - upgraded pip. I don't > understand the reason for the permission errors as I am owner and have full control for > the temporary directory created. > > What can I do to fix this? > > > C:\Apps\Python35>pip install --upgrade pip > File "C:\Apps\Python35\lib\shutil.py", line 377, in _rmtree_unsafe > os.unlink(fullname) > PermissionError: [WinError 5] Access is denied: > 'C:\\Users\\Andreas\\AppData\\Local\\Temp\\pip-xf9kwi7g-uninstall\\apps\\python35\\scripts\\pip.exe' This is a problem with the way Windows locks running executables, conflicting with the way pip wants to delete (unlink) the executable. It appears to be a known issue by the pip people: https://github.com/pypa/pip/issues/2773 One workaround is to skip the short-hand "pip" when upgrading pip itself, and type out the command in full: python -m pip install --upgrade pip Just make sure you run the same Python (so you may need to run "python3 -m pip etc", not sure) so it upgrades the right pip. ChrisA