Skip to content

fix(install): clear venv python locks on Windows - #47569

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix-47557-venv-locks
Closed

fix(install): clear venv python locks on Windows#47569
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix-47557-venv-locks

Conversation

@LeonSGP43

@LeonSGP43 LeonSGP43 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stop python.exe and pythonw.exe only when they are still running from the old venv\Scripts directory during venv recreation
  • keep the existing hermes.exe taskkill path and run the python cleanup before Remove-Item venv
  • add a regression test that locks this install.ps1 ordering contract

Testing

  • git diff --check
  • python3 -m pytest tests/test_install_unmerged_index.py -q
  • uv run --frozen ruff check tests/test_install_unmerged_index.py

Closes #47557

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jun 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #46726 — both fix scripts/install.ps1 so venv recreation stops the venv-resident pythonw.exe/python.exe (gateway/agent launched straight out of venv\Scripts\) holding .pyd locks, before Remove-Item venv. #46726 is the earlier open PR and uses the same mechanism; this one additionally adds a path-prefix guard and an ordering regression test. Both target #47557 (and follow merged #45120, which only killed hermes.exe). Suggest consolidating into #46726.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Windows: scripts/install.ps1 venv recreation fails when pythonw.exe holds .pyd locks — only kills hermes.exe

2 participants