[BUG] Windows installer silently produces a broken install: `kotaemon` core never installs, and the success check cannot detect it
Description
Environment
| kotaemon-app version | 0.12.0 (tag v0.12.0, Windows zip) |
| OS | Windows 11, x64 |
| Python | 3.10.21 (conda env created by the installer) |
| pip | 26.2.1 |
| Installer | scripts/run_windows.bat |
| Date observed | 2026-09-18 (relevant — see root cause) |
Symptom
scripts/run_windows.bat appears to complete, then the app crashes on startup:
******************************************************
Installing Kotaemon
******************************************************
Dependencies are already installed
...
Starting Kotaemon UI...
Traceback (most recent call last):
File "...\app.py", line 3, in <module>
from theflow.settings import settings as flowsettings
ModuleNotFoundError: No module named 'theflow'
Will exit now...
Script completed successfully.Note the last two lines: the launch failed, and the script still reports success.
Re-running the script does not repair the install — it prints "Dependencies are already installed" and goes straight back to the same crash.
Root cause
Four defects compound. Only the first is environmental; the rest are in the script.
1. The kotaemon core install never terminates (pip resolver backtracking)
libs/kotaemon/pyproject.toml pins:
"pydantic<=2.10.6",
"fastapi<=0.112.1",
"pandas>=2.2.2,<2.3",
"chromadb<=0.5.16",
"umap-learn==0.5.5",Every current release of langchain-*, google-genai and protobuf requires newer
pydantic. pip therefore walks the entire release history of each package looking for a
combination that satisfies the pins. Running line 217 by hand:
python -m pip install git+https://github.com/Cinnamon/[email protected]#subdirectory=libs/kotaemonproduced, in 30+ minutes without terminating:
INFO: This is taking longer than usual. You might need to provide the dependency
resolver with stricter constraints to reduce runtime. ... If you want to abort this
run, press Ctrl + C. <- printed 7 times| Package | Versions tried |
|---|---|
langchain-openai |
122 |
google-genai |
52 |
langchain-mistralai |
41 (down to 0.0.1, the oldest that exists) |
langchain-google-genai |
24 |
gradio |
24 |
langchain-ollama |
21 |
protobuf |
walked from 7.36 down to 6.33 |
Totals for the run: 532 .whl.metadata probes, 2 actual package downloads, 0 errors.
This matters for diagnosis: it never fails, it just grinds. Between the tiny metadata downloads pip is silent for minutes at a time, so on screen it is indistinguishable from a hang or a crash — users reasonably close the window, which is how the partial install happens.
2. The individual pip install calls are not error-checked
scripts/run_windows.bat:217-219:
python -m pip install git+https://github.com/Cinnamon/kotaemon.git@"%app_version%"#subdirectory=libs/kotaemon
python -m pip install git+https://github.com/Cinnamon/kotaemon.git@"%app_version%"#subdirectory=libs/ktem
python -m pip install --no-deps git+https://github.com/Cinnamon/kotaemon.git@"%app_version%"No ERRORLEVEL check between them. When step 1 is killed or fails, steps 2 and 3 run
anyway. Result: ktem and kotaemon-app install successfully while kotaemon — and
therefore theflow, llama-index, langchain, openai, chromadb — are absent.
Worse, the ktem install then pulls in current pydantic / fastapi / pandas,
which actively conflict with kotaemon's pins and make a later repair harder.
3. The verification check gives a false positive
scripts/run_windows.bat:200 and :222:
pip list | findstr /C:"kotaemon" >NUL 2>&1findstr does a substring match, and kotaemon-app contains the substring
kotaemon. Since kotaemon-app installed fine at step 3, the check passes even though
the core library is missing. This is why:
- the post-install guard at line 222 never fires, and
- every subsequent run reports "Dependencies are already installed" (line 200) and skips the install entirely — the installer can never self-repair.
4. launch_ui failure is reported as success
scripts/run_windows.bat:62-66:
CALL :print_highlight "Launching Kotaemon in your browser, please wait..."
CALL :launch_ui
<- no IF ERRORLEVEL 1 GOTO :end
CALL :deactivate_environment
GOTO :end_successEvery other step in the main routine is followed by IF ERRORLEVEL 1 GOTO :end;
launch_ui is the only one that is not. So :launch_ui failing (line 278 does
GOTO :exit_func_with_error) falls straight through to :end_success, printing
"Script completed successfully."
Suggested fixes
1. Constrain the resolution. The repo already contains uv.lock with a known-good
432-package resolution, but the zip does not ship it and the installer does not use it.
Either install with uv, or ship a lock-derived constraints file and use it:
uv export --frozen --no-dev --no-hashes --no-emit-workspace --no-annotate \
--package kotaemon --format requirements-txt -o requirements-lock.txtpython -m pip install -r requirements-lock.txt || GOTO :exit_func_with_error
python -m pip install --no-deps git+...#subdirectory=libs/kotaemon || GOTO :exit_func_with_errorThis turns an unbounded backtrack into a linear install. Measured on the same machine: zero "taking longer than usual" warnings, completed normally.
2. Check each install. Append || GOTO :exit_func_with_error to each pip install
at lines 217-219.
3. Make the check exact. Replace the substring match at lines 200 and 222:
python -m pip show kotaemon >NUL 2>&1pip show matches the distribution name exactly and cannot be satisfied by
kotaemon-app.
4. Check launch_ui. Add IF ERRORLEVEL 1 GOTO :end after line 63 so a failed
launch does not print "Script completed successfully."
5. Minor. Line 6 reads the tag with SET /p app_version=<"%CD%\VERSION", which
preserves trailing whitespace. A VERSION file containing a stray trailing space yields
error: pathspec '0.12.0 ' did not match any file(s) known to git, which does not
obviously point back at the file. Trimming the value would make that failure legible.
Workaround for affected users
From the unzipped app folder, using the environment the installer already built:
:: 1. Get the locked dependency set (needs uv and git)
install_dir\env\python.exe -m pip install uv
git clone --depth 1 --branch v0.12.0 https://github.com/Cinnamon/kotaemon.git C:\temp\kt
cd C:\temp\kt
uv export --frozen --no-dev --no-hashes --no-emit-workspace --no-annotate ^
--package kotaemon --format requirements-txt -o requirements-lock.txt
:: 2. Install it, then the core package itself without re-resolving
install_dir\env\python.exe -m pip install -r C:\temp\kt\requirements-lock.txt
install_dir\env\python.exe -m pip install --no-deps ^
"git+https://github.com/Cinnamon/[email protected]#subdirectory=libs/kotaemon"If the broken install already pulled in newer pydantic / fastapi / pandas, the
pinned requirements file downgrades them correctly. Afterwards
install_dir\env\python.exe -m pip check should report no broken requirements.
One extra package may also be needed — see the Appendix on voyageai.
Reproduction steps
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See errorScreenshots
Logs
Browsers
No response
OS
No response
Additional information
No response
Source: Cinnamon/kotaemon