-
Notifications
You must be signed in to change notification settings - Fork 28
fix: allow uv install outside venv #274
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
base: main
Are you sure you want to change the base?
Conversation
| None, | ||
| "--project", | ||
| help="Project directory to use with --install-target project", | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uninstall command ignores install-target and project options
The uninstall command adds install_target and project parameters (lines 1775-1787), but these are never used in the function body. The uninstall logic (lines 1809-1830) always runs uv pip uninstall in the current environment without considering the target. This means packages installed with --install-target prime or --install-target project cannot be properly uninstalled because the uninstall command will attempt to remove from the wrong environment.
Additional Locations (1)
|
|
||
| use_system, uv_env, uv_cwd, venv_path = _resolve_uv_install_context( | ||
| install_target, project | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing exception handling for install context resolution in run_eval
The run_eval function calls _resolve_uv_install_context without a try/except block, unlike the install command which catches ValueError and displays a friendly error message. When install_target is "project" but no pyproject.toml or uv.toml is found in the directory tree, _resolve_uv_install_context raises a ValueError that would propagate as an uncaught exception with an ugly stack trace, rather than the clean CLI error shown in install.
Summary
--install-target {prime, project, system}toprime env installandprime eval(default:prime)~/.prime/venvs/default, or a project.venv, or useuv pip install --systemuv runall use the same uv contextRationale
uv pip installrequires a target environment. Defaulting to a managed venv prevents accidental system installs while keeping quick‑start smooth; users can opt into project or system installs explicitly.Fixes PrimeIntellect-ai/prime-environments#455
Notes
--projectlets users point to a specific project root for the.venvtarget