Servers - General
1837835 Members
2393 Online
110121 Solutions
New Discussion

Fixing Python Installation Error 0x80070659 on Windows Server 2022

 
yashwanth_k
Occasional Contributor

Fixing Python Installation Error 0x80070659 on Windows Server 2022

Struggling to install Python on Windows? You’re not alone.

If you’ve run into the 0x80070659 error while installing Python it usually means the Windows Installer is being blocked by a system policy. This can happen because of Group Policy restrictions, registry settings, or security configurations that prevent software installations.

Python is everywhere these days — powering automation, AI and ML projects, DevOps workflows, and data pipelines. This error can completely stop your setup and prevent you from running any of your accelerator or automation solutions. Getting past this installer block is essential to set up Python smoothly and keep your workflows running without interruptions.

Python installation failed with error code 0x80070659 — blocked by Windows Installer policy.Python installation failed with error code 0x80070659 — blocked by Windows Installer policy.


Root Cause

The error happens when the registry key controlling MSI installations restricts or disables installer execution. This prevents the Python MSI installer from running successfully.


Step-by-Step Resolution

1. Re-register the Windows Installer
This refreshes the Windows Installer service and resolves corruption issues. Run these commands in an elevated Command Prompt (Run as Administrator):

msiexec /unregister
msiexec /regserver

Restart your system after running the commands.


2. Modify the Registry Policy
Ensure MSI installations are not disabled in the registry:

  1. Press Win + R, type regedit, and press Enter.

  2. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer

  3. Locate or create a DWORD (32-bit) value named DisableMSI.

  4. Set its value to 0.

  5. Restart your PC.


Result

After these steps, the Python installer should run without any policy-related blocks. Re-registering the Windows Installer and updating the registry value resolved the error completely.

1 REPLY 1
pearlwilson
HPE Pro

Re: Fixing Python Installation Error 0x80070659 on Windows Server 2022

very useful article on fixing Python installation error

I'm an HPE employee.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo