This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Can't install Python v3.9.4 / 0x80070643 / windows 10 64bit
Type: crash Stage: resolved
Components: Installation Versions: Python 3.9
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Marwan, iritkatriel, paul.moore, shreyanavigyan, steve.dower, terry.reedy, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2021-04-30 03:56 by Marwan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Python 3.9.4 (64-bit)_20210430053233.log Marwan, 2021-04-30 03:56
logs.rar Marwan, 2021-05-02 17:24
Messages (12)
msg392378 - (view) Author: Marwan Essam (Marwan) Date: 2021-04-30 03:56
Hello, 
While I was trying to install Python version 3.9.4 on Windows 10 64bit, Error 0x80070643 - Fatal error during installation is showing, with a message saying " install the process cannot access the file because another process has locked a portion of the file", 

Note: There was an older version of Python installed on my laptop in 2018, but a while ago i did a system format, but some of the .XMl and .py files still there ( i don't know if that's the case)

Core_AllUsers (https://pastebin.com/iAZGTrkx)
msg392533 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-04-30 22:59
The error message suggests somethng else is using something in an existing 3.9 directory, and that you should close everything and reboot your machine and try again without running anything else.
msg392560 - (view) Author: Marwan Essam (Marwan) Date: 2021-05-01 01:45
Hello Terry, thank you for replying.
I tried many times to reboot and no luck.
Also i noticed that when i tried to install an older version like Python 2 the installation done without errors.
msg392561 - (view) Author: Marwan Essam (Marwan) Date: 2021-05-01 01:49
Also if you are talking about the location of installation, i tried to install it in somewhere else and still not working
msg392691 - (view) Author: Marwan Essam (Marwan) Date: 2021-05-02 11:56
Can someone help please, i need it in my project
msg392703 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-05-02 14:43
Hi Marwan

If you look in your %TEMP% directory for the log file you attached, you'll find some more similar log files. Could you attach those as well? One of them will have the actual issue in it.
msg392710 - (view) Author: Marwan Essam (Marwan) Date: 2021-05-02 17:24
Done, i uploaded a rar with all the log files in %TEMP%
msg392712 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-02 17:53
See if the your problem is solved by following https://docs.microsoft.com/en-us/troubleshoot/windows-server/application-management/msi-installation-error-1603.
msg392716 - (view) Author: Marwan Essam (Marwan) Date: 2021-05-02 20:00
Hello Shreyan,
unfortunately still not working, I tried all the solutions and none worked. still showing the same error.
msg392741 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-05-02 22:01
This is the full error message (and sorry I just saw that you put it on pastebin in the first post).

MSI (s) (18:04) [13:13:04:342]: SECREPAIR: Hash Database: C:\Windows\Installer\SourceHash{1C17C2CE-B315-4C1C-885A-E37181C7368E}
MSI (s) (18:04) [13:13:04:342]: Note: 1: 2203 2: C:\Windows\Installer\SourceHash{1C17C2CE-B315-4C1C-885A-E37181C7368E} 3: -2147023504 
MSI (s) (18:04) [13:13:04:342]: SECREPAIR: Error in CreateDatabase for write
MSI (s) (18:04) [13:13:04:342]: SECUREREPAIR: SecureRepair Failed. Error code: 89b55C5DDD8

This file isn't ours, so there's nothing we can do. You could try running some of the builtin troubleshooters, or perhaps the "sfc /scannow" command (in an elevated prompt) might help. It's possible that you have an aggressive antivirus or admin policy that you may be able to disable. Otherwise, for a corrupt install database, I'd guess you're looking at a Windows reset/reinstall.

If you have any success, please let us know what worked. If it turns out to be something within our control, we can try and make a change, but I suspect it'll just be handy to know for next time someone hits an issue like this.
msg392785 - (view) Author: Marwan Essam (Marwan) Date: 2021-05-03 10:00
Hello Steve

I did a Windows format and now I can successfully install Python, Thanks for helping
msg401637 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-09-11 10:59
Thanks for the update Marwan. I'm closing because there doesn't seem to be any followup possible on our side.
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88149
2021-09-11 10:59:06iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg401637

stage: resolved
2021-05-03 10:00:37Marwansetmessages: + msg392785
2021-05-02 22:01:04steve.dowersetmessages: + msg392741
2021-05-02 20:00:16Marwansetmessages: + msg392716
2021-05-02 17:53:01shreyanavigyansetnosy: + shreyanavigyan
messages: + msg392712
2021-05-02 17:24:05Marwansetfiles: + logs.rar

messages: + msg392710
2021-05-02 14:43:11steve.dowersetmessages: + msg392703
2021-05-02 11:56:36Marwansetmessages: + msg392691
2021-05-01 01:49:39Marwansetmessages: + msg392561
2021-05-01 01:45:10Marwansetnosy: + Marwan
messages: + msg392560
2021-04-30 22:59:18terry.reedysetnosy: + terry.reedy
messages: + msg392533
2021-04-30 03:57:11Marwansetnosy: - Marwan
2021-04-30 03:56:37Marwancreate