Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion llm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2996,7 +2996,12 @@ def display_truncated(text):
is_flag=True,
help="Include pre-release and development versions",
)
def install(packages, upgrade, editable, force_reinstall, no_cache_dir, pre):
@click.option(
"--user",
is_flag=True,
help="Install to the Python user install directory for your platform.",
)
def install(packages, upgrade, editable, force_reinstall, no_cache_dir, pre, user):
"""Install packages from PyPI into the same environment as LLM"""
args = ["pip", "install"]
if upgrade:
Expand All @@ -3009,6 +3014,8 @@ def install(packages, upgrade, editable, force_reinstall, no_cache_dir, pre):
args += ["--no-cache-dir"]
if pre:
args += ["--pre"]
if user:
args += ["--user"]
args += list(packages)
sys.argv = args
run_module("pip", run_name="__main__")
Expand Down