Skip to content

Python installation gutted my Python directory, now gives me a fatal error. No idea how to install Python now. #135159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
inhahe opened this issue Jun 5, 2025 · 4 comments
Labels
OS-windows topic-installation type-bug An unexpected behavior, bug, or error

Comments

@inhahe
Copy link

inhahe commented Jun 5, 2025

Bug report

Bug description:

I've had a problem for years where every time I install a new version of Python into a new directory using the .exe installer from python.org, the installer deletes all the main Python files, such as the .exe's, etc., from the previous installation's directory. I don't usually try the upgrade option instead, but I tried it just now because I didn't want to have to reinstall my libraries, and the installer simply deleted all the main Python files from the current Python directory, leaving me with no working installation of Python.

When I tried running the installer again, I only got the options repair, modify, and whatever, so I tried uninstalling Python and then reinstalling it to a new directory. That just gave me a fatal error, 0x80070643, when trying to reinstall it. I tried looking that up for help, but what I found wasn't very helpful. So, now I have no working Python installation (well, I may have earlier versions kicking around, assuming previous installations didn't gut them all, but I want 3.13) and no way to install it.

Here are the contents of Python 3.13.4 (64-bit)_20250605021922.log, which for some reason the installer put into one of my Visual Studio Python project directories, or at least that's the log the error dialog linked to:

Python 3.13.4 (64-bit)_20250605021922.log

Edit: I just tried rebooting and installing again, and this time it went further but then I got a different error: 0x80070659 - This installation is forbidden by system policy. Contact your system administrator.
Edit 2: I ran the installer as administrator this time and it worked. I'm still leaving this bug report here, though, as I was unable to to do an upgrade, and also new installations shouldn't delete the contents of previous installations. And not to mention that giving a fatal error because I didn't reboot the computer when I wasn't told to isn't ideal, either, and nor is requiring the user to run as admin without telling them that. =P

CPython versions tested on:

3.13

Operating systems tested on:

Windows

@inhahe inhahe added the type-bug An unexpected behavior, bug, or error label Jun 5, 2025
@mokko
Copy link

mokko commented Jun 6, 2025

As long as I can remember Python requires administrator rights on Windows for normal installation.

@calan0117
Copy link

I have the same problem.

Even if I install it with the administrator privileges, it still cannot be installed successfully.

Python 3.13.4 (64-bit)_20250608181724.log

Then I changed the installation path to d:\devtools\python

Sometimes it happens:

Image

@zooba
Copy link
Member

zooba commented Jun 9, 2025

As long as I can remember Python requires administrator rights on Windows for normal installation.

Hasn't been required since 3.5 - it was one of the first things I fixed over ten years ago.

Sometimes it happens:

This seems like some pretty significant system corruption. You might be heading towards needing to do an OS reset to clean up whatever things have gotten messed up over time.

I don't usually try the upgrade option instead, but I tried it just now because I didn't want to have to reinstall my libraries, and the installer simply deleted all the main Python files from the current Python directory, leaving me with no working installation of Python.

This tends to happen after you've done non-standard installs previously (such as installing a new version on top of an old one without uninstalling the earlier one). The installers work fine when you follow the defaults, and almost always work fine if you choose your directories carefully (without collisions/overwriting), but break down very quickly if you do anything weirder than that. It's a big part of why we've deprecated them and are moving towards a system where you don't even get that choice (and if you want that choice, you'll clearly take full responsibility for it so there's no installer involved to break).

If you install pip as part of it, you usually need to Repair before you Uninstall, or else pip's uninstallation breaks. If you've got old installs registered, even if the files are not actually present, then I'd suggest going through each and repairing then uninstalling them one at a time. By the end, you should be clear enough to install the version you want.

Or alternatively, you might switch to the new installer and install all the old versions you want with that. You've clearly got some strong preferences for some reason, so I'd be interested to hear how badly the new installer breaks your workflow and why, to see if there's any way we can support it.

@inhahe
Copy link
Author

inhahe commented Jun 9, 2025

@zooba Oh, if you're talking to me, I don't have any particular preference for installer, I just want to use what's best. The installer I used was the most obvious/default link to the latest version that I found near the top of the front page of python.org. Thanks for all the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants