Fix Windows installer clean-machine Python setup#9
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the Windows installer work on a clean Windows 10/11 x64 machine (no Python, Tesseract, or Poppler). Base: current
main.Root cause
The installer only worked where Python/Tesseract/Poppler already existed. The clean-machine route relied on a fragile custom-
TargetDirPython install (which silently fails into repair mode when a Python already exists) and installed packages into that interpreter directly. There was no guaranteed project environment.Fix: managed Python + project-local venv
installers/runtime/windows/venvand installrequirements.txtinto it.venv\Scripts\python.exe).C:\Python; validated (3.10+, pip, tkinter) before continuing with the exact failing condition.Wizard
Python page now has 3 explicit options: Recommended: managed, Use detected compatible Python, Advanced: custom. Managed is selected by default when no compatible Python is detected.
Policies
gui_readyderives from venv validation, independent of OCR capability.install_state.json
Records
python_mode(managed_installed/detected_existing/custom),base_python_path,venv_python_path,packages_installed,tesseract_mode/tesseract_path,poppler_mode/poppler_bin_path,path_policy,gui_ready,ocr_capability,install_timestamp,installer_version.Tests
python -m unittest discover -s tests -v-> 50 passedinstallers\windows\tests\Run-InstallerTests.bat-> 51 passedManual clean-machine test
C:\ts).installers\windows\Install and Run.bat.installers\runtime\windows\venv\Scripts\python.exe installers\common\bootstrap.py doctorinstallers\runtime\windows\install.log(andpython-installer.log).