Find the error behind “Setup was unsuccessful”
Save the error code, failed feature, or log path that appears with or before the final screen. A generic summary cannot distinguish permission trouble from a failed component, previous installation, or Windows installer state.
Retry with the correct installation scope
If only your Windows account needs Python, use a per-user installation. If you selected all-users setup or Program Files, administrator approval may be required. For old releases, use the Python version your project requires rather than changing versions just to get a green setup screen.
Identify existing Python runtimes and launchers
where.exe py
Open Installed apps and identify the runtime tied to the failed setup. Multiple versions can coexist, so remove only the installation you have evidence is damaged or conflicting.
Use the installer log if setup fails again
The classic installer supports logging, and current Install
Manager troubleshooting refers to logs in %TEMP% by
default. Search for the first component or error that fails, not
merely the final “setup unsuccessful” line.
Avoid destructive “cleanup” fixes
- Do not delete every Python folder in AppData and Program Files.
- Do not use registry cleaners as a Python repair method.
- Do not remove PATH entries you do not understand.
- Do not jump randomly between Store, MSIX and classic installers without knowing which one owns your commands.
Verify the installation after setup succeeds
py list
python -c "import sys; print(sys.executable)"
python -m pip --version
If these work, setup is healthy even if an old shortcut remains broken.
Check what remains before the next attempt
A failed setup may leave a launcher, manager, shortcut, or partial runtime entry behind. Before retrying, check Installed apps and command resolution so you know the actual starting state.
where.exe py
where.exe pymanager
If no intended runtime exists, retry installation after fixing the identified cause. If a working runtime already exists, do not create a duplicate just because the previous maintenance operation ended unsuccessfully.
Read the failure from the bottom up—but find the first cause
Open the log path shown by setup or check the documented
temporary-log location for the Install Manager. Search for the
failed feature, error, failed, or the
numeric code shown on screen. The last lines often describe the
rollback, while the useful cause appears earlier.
- A permission or policy result should lead to the correct install scope or administrator—not file deletion.
- A download or verification result calls for a fresh official package and one controlled retry.
- A failed optional feature may require modifying the matching classic installation rather than replacing every runtime.
- A successful install followed by wrong commands is a separate PATH, alias or interpreter-selection issue.
Keep the original log until Python passes verification. It is the best way to avoid guessing when setup rolls back with the same generic final screen.
Frequently asked questions
Is “Setup was unsuccessful” the real error?
Usually it is the summary. The component failure, code or installer log is what identifies the cause.
Should I uninstall every Python version?
No. Multiple versions are valid and may be intentional.
What if setup succeeds but python still fails?
Move to PATH, alias, launcher or interpreter-selection troubleshooting instead of repeating a successful installer.
Related Python fixes
Continue with the page that matches the symptom you see after this step.
References
Installation behavior and commands were checked against current Python documentation on 10 August 2026.