Python.exe System Error missing python.dll

I have been trying to install python with “python-3.11.5-amd64” on Windows 11. But whenever it reaches the “Precompiling Standard Library” it proceeds with this Error.

“The code execution cannot proceed because python.dll was not found. Reinstalling the program may fix this problem”

Then I try re-run the installer with Repair (running as ADMIN) but I get the same error.

I’ve also tried uninstalling and reinstalling; and I get the same issue.

Suggest you first tell windows to uninstall this python, if it is recorded as installed.
Delete the install .exe and download python again and try the install again using this link https://www.python.org/ftp/python/3.11.5/python-3.11.5-amd64.exe

Let us know if this helps?

1 Like

I ran CC Cleaner to fix the python references, attempted to reinstall and still errors.

Screenshot of my Control Panel

I did find that python exists in WindowsApps

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

C:\Windows\System32>where python.exe
C:\Users\Mike Jones\AppData\Local\Microsoft\WindowsApps\python.exe

C:\Windows\System32>

I went through and disabled Python in Aliases which removed it from WindowsApps

C:\>where python.exe
INFO: Could not find files for the given pattern(s).

Installer is still failing though

I tried setting Everyone Permissions (from Missing dll Error Whle installing Python 2.7 - Stack Overflow) for " C:/Users/My Account/AppData/Local" in “Temp” but that didn’t work either

Have you installed the windows app store python as well?

You may be finding that the app store version is conflicting with the python.org version.

Check in the app store and uninstall python from there if it is installed.

I recommend you use the python.org versions, not the app store version.

This was a fresh install of Windows using a Media USB I did last week so I’m really confused on why I can’t install it.

Hi,

I am getting the same issue as Michael. I downloaded python-3.12.0-amd64.exe from python dot org. Attempts to install for all users (and running as administrator) result in the same System Error pop-up that Michael gets (except that “python312.dll” is missing) The pop-up appears three times and then the installer reports success. When then I attempt to run python the missing DLL pop-up appears . A search of my system for a file named python312.dll yields nothing.

When I install for just the user the process completes but then attempts to run python trigger the System Error pop-up.

The machine was previously running python 3.10.7 (got via installer from python dot org). This had been uninstalled.

Below is a snippet of the log file that I think corresponds with the System Error pop-ups. I can provide the whole log if needed.

Thanks,
Dave

[12BC:65C0][2023-11-06T14:57:40]i001: Burn v3.14.0.5722, Windows v10.0 (Build 19045: Service Pack 0), path: C:\Windows\Temp\{F34DC45E-F74E-4B59-B4CC-4C6C66A97D2D}\.cr\python-3.12.0-amd64.exe
...
[12BC:65C0][2023-11-06T14:58:13]i301: Applying execute package: path_JustForMe, action: Uninstall, path: (null), arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files\Python312" OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.12\InstalledFeatures"'
[12BC:65C0][2023-11-06T14:58:13]i319: Applied execute package: path_JustForMe, result: 0x0, restart: None
[66F4:6310][2023-11-06T14:58:13]i301: Applying execute package: compileall_AllUsers, action: Install, path: C:\ProgramData\Package Cache\9779F8E04E7A01A68A3B636AE4B5212AA46575B2\py.exe, arguments: '"C:\ProgramData\Package Cache\9779F8E04E7A01A68A3B636AE4B5212AA46575B2\py.exe" -3.12 -E -s -Wi "C:\Program Files\Python312\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "C:\Program Files\Python312\Lib"'
[66F4:6310][2023-11-06T14:58:30]e000: Error 0xc0000135: Process returned error: 0xc0000135
[66F4:6310][2023-11-06T14:58:30]e000: Error 0xc0000135: Failed to execute EXE package.
[12BC:65C0][2023-11-06T14:58:30]e000: Error 0xc0000135: Failed to configure per-machine EXE package.
[12BC:65C0][2023-11-06T14:58:30]w350: Applied non-vital package: compileall_AllUsers, encountered error: 0xc0000135. Continuing...
[66F4:6310][2023-11-06T14:58:30]i301: Applying execute package: compileallO_AllUsers, action: Install, path: C:\ProgramData\Package Cache\9779F8E04E7A01A68A3B636AE4B5212AA46575B2\py.exe, arguments: '"C:\ProgramData\Package Cache\9779F8E04E7A01A68A3B636AE4B5212AA46575B2\py.exe" -3.12 -O -E -s -Wi "C:\Program Files\Python312\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "C:\Program Files\Python312\Lib"'
[66F4:6310][2023-11-06T14:58:32]e000: Error 0xc0000135: Process returned error: 0xc0000135
[66F4:6310][2023-11-06T14:58:32]e000: Error 0xc0000135: Failed to execute EXE package.
[12BC:65C0][2023-11-06T14:58:32]e000: Error 0xc0000135: Failed to configure per-machine EXE package.
[12BC:65C0][2023-11-06T14:58:32]w350: Applied non-vital package: compileallO_AllUsers, encountered error: 0xc0000135. Continuing...
[66F4:6310][2023-11-06T14:58:32]i301: Applying execute package: compileallOO_AllUsers, action: Install, path: C:\ProgramData\Package Cache\9779F8E04E7A01A68A3B636AE4B5212AA46575B2\py.exe, arguments: '"C:\ProgramData\Package Cache\9779F8E04E7A01A68A3B636AE4B5212AA46575B2\py.exe" -3.12 -OO -E -s -Wi "C:\Program Files\Python312\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "C:\Program Files\Python312\Lib"'
[66F4:6310][2023-11-06T14:58:33]e000: Error 0xc0000135: Process returned error: 0xc0000135
[66F4:6310][2023-11-06T14:58:33]e000: Error 0xc0000135: Failed to execute EXE package.
[12BC:65C0][2023-11-06T14:58:33]e000: Error 0xc0000135: Failed to configure per-machine EXE package.
[12BC:65C0][2023-11-06T14:58:33]w350: Applied non-vital package: compileallOO_AllUsers, encountered error: 0xc0000135. Continuing...
[12BC:65C0][2023-11-06T14:58:33]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{cf9c4d97-48a7-4a27-b9fc-91b88a803c40}, resume: ARP, restart: None, disable resume: No
[12BC:65C0][2023-11-06T14:58:33]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{cf9c4d97-48a7-4a27-b9fc-91b88a803c40}, resume: ARP, restart initiated: No, disable resume: No
[12BC:65C0][2023-11-06T14:58:33]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No
[12BC:5DA0][2023-11-06T14:58:33]i000: Failed to read LongPathsEnabled value: error code 0
[12BC:65C0][2023-11-06T15:09:19]i500: Shutting down, exit code: 0x0
[12BC:65C0][2023-11-06T15:09:19]i410: Variable: ActionLikeInstallation = Setup
[12BC:65C0][2023-11-06T15:09:19]i410: Variable: ActionLikeInstalling = Installing
[12BC:65C0][2023-11-06T15:09:19]i410: Variable: AppendPath = 0
...
[12BC:65C0][2023-11-06T15:09:19]i007: Exit code: 0x0, restarting: No
1 Like

What version of Windows are you install python on?

Hi Barry,

Windows 10 Pro
Version 22H2
OS Build 19045.3570

Ok I’d not expect any issue with Windows 10.

I wonder if your anti-virus software is getting in the way?
Do you have any “enterprise security” tools on your PC?

Basically is there a third party that is breaking things?

My laptop itself is on Windows 11 and I can install Python 3.12 without issue. I wouldn’t run as administrator if you can help it. For both people having trouble, I would completely uninstall, reboot, install from the Python website. Tell it to set the env variables.

Thanks Barry and Steven.
I don’t think there is enterprise security getting in the way but would not be surprised if Windows misconfiguration was my issue. I have now got a successful installation using pyenv-win.

1 Like

I actually got my Python installed; I had to check “Install with Admin Permissions” and it worked

python -V
Python 3.12.0
1 Like

Anyone have any ideas for how to help resolve this? I’m getting the exact same issues. I’ve tried uninstalling/reinstalling and restarting my computer multiples times. This happens when I try to install as admin (for all users) or just for my user. I’m downloading the official version (python-3.12.0-amd64.exe) from python.org.
Nothing’s worked!

If it may provide any context: I was previously getting a different error

Error 0x80070643: Failed to uninstall MSI package.
Error 0x80070643: Failed to configure per-user MSI package.
Error 0x80070643: Failed to execute MSI package.`

and I’m not sure what changed that now it’s become this one, where the dialog pops up with a failure message (that the dll is missing) but then I see the “Successfully installed” screen. However, any attempts to use Python fail due to the missing dlls.

It may have something to do with some corrupted Registry keys maybe? Any thoughts about how to fix that if it’s related? I also had tried installing via winget – don’t know if that may be related.

1 Like

I couldn’t figure out how to resolve it other than reinstalling Windows – which worked :person_shrugging:

I had the same issue, and weirdly enough, I think it’s the new Python installer what’s causing the issue. I went back and downloaded Python 3.11.5 instead of 3.12 onwards. Somehow, that did the trick, which got me thinking it might be the new version that’s causing the issue.

1 Like