Skip to content

Commit

Permalink
Add upgrade and upgrade eager flags to pip install call
Browse files Browse the repository at this point in the history
  • Loading branch information
JCZuurmond committed Jul 30, 2024
1 parent a52b188 commit 40d83eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/labs/project/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,10 @@ func (i *installer) installPythonDependencies(ctx context.Context, spec string)
// - python3 -m ensurepip --default-pip
// - curl -o https://bootstrap.pypa.io/get-pip.py | python3
var buf bytes.Buffer
// Ensure latest version(s) is installed with the `--upgrade` and `--upgrade-strategy eager` flags
// https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-U
_, err := process.Background(ctx,
[]string{i.virtualEnvPython(ctx), "-m", "pip", "install", spec},
[]string{i.virtualEnvPython(ctx), "-m", "pip", "install", "--upgrade", "--upgrade-strategy", "eager", spec},
process.WithCombinedOutput(&buf),
process.WithDir(libDir))
if err != nil {
Expand Down

0 comments on commit 40d83eb

Please sign in to comment.