Skip to content

Instantly share code, notes, and snippets.

@metinsanli
Created November 22, 2024 10:22
Show Gist options
  • Select an option

  • Save metinsanli/1eefdcfe392b1c9fb864ce9e2fcc2ac6 to your computer and use it in GitHub Desktop.

Select an option

Save metinsanli/1eefdcfe392b1c9fb864ce9e2fcc2ac6 to your computer and use it in GitHub Desktop.
Script to update outdated python modules.
$outdated = python -m pip list --outdated | Select-Object -Skip 2
$fw = $outdated -split '\n' | ForEach-Object { $_.Split(' ')[0] }
$count = $fw.Count
foreach ( $pack in $fw) {
Write-Host "[$count] updating -- $pack --"
python -m pip --no-cache-dir install --upgrade $pack
$count--
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment