Python installer: "0x80070642 - User cancelled installation"
Asked Answered
B

2

15

Whenever I try to install Python 3.6.3 (32-bit) to my Windows 7 laptop at work, the installer fails with the following error.

0x80070642 - User cancelled installation

This error consistently occurs half-way through the installation while installing "Python 3.6.3 Standard Library (32-bit)", as indicated by Python's progress bar turning red in the taskbar icon.

Looking at the installer log, I noticed a few entries which report Failed to secure cache path:, but searching these errors hasn't provided any additional details.

Error 0x80070005: Failed to secure cache path: C:\ProgramData\Package Cache\
Error 0x80070005: Failed to secure cache directory: C:\ProgramData\Package Cache\
Error 0x80070005: Failed to get cached path for package with cache id: {C093353B-F9EE-4A06-923D-C1B340B82886}v3.6.6119.0
Error 0x80070005: Failed to cache payload: launcher_AllUsers
Failed to cache payload: launcher_AllUsers from working path: C:\Users\SVASCE~1\AppData\Local\Temp\{973D88A7-E2AD-4A3C-AA24-79C5637B217A}\launcher_AllUsers, error: 0x80070005.
Baras answered 23/10, 2017 at 16:3 Comment(1)
This will be better handled on the bugs.python.org issue tracker. The Windows installer for 3.5+ is almost entirely the work of only one Python core developer. He can at least take a look and see if maybe it's a problem with the installer or if information about the failure can be improved in the logs. ERROR_INSTALL_USEREXIT (0x0642) is probably just from the bundled installer canceling because of the ERROR_ACCESS_DENIED (0x0005) failure.Flogging
B
31

I was able to resolve the error by unchecking 'Install launcher for all users'. Once unchecked, the installer worked as expected without any issue.

Installer with "install launcher for all users" unchecked

Presumably there was an issue with folder permissions, since this was on a managed work machine.

Baras answered 25/10, 2017 at 15:19 Comment(3)
You are awesome. Thank you so much, I've been trying to do this installation on my workstation for 20 work hours! thanks!Furthermost
The above answer did not work for me. I right clicked the setup and run it as administrator and then it worked!Decide
This also works for Windows 10 and python 3.11 except the box label is a little different. I ran as admin but not sure if it's needed.Victorinavictorine
U
1

Right click the setup and run it as administrator.

Uniocular answered 17/5 at 18:46 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Basket

© 2022 - 2024 — McMap. All rights reserved.