Python Forum
PowerShell script file for updating packages
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PowerShell script file for updating packages
#4
(Jun-16-2022, 03:47 AM)pnachtwey Wrote: I will need to have an easy way of excluding the problem packages
If you mean in the pip command line, you could replace it by something like
from pathlib import Path
import subprocess as sp
import sys

with Path('req0.txt').open('w') as ofile:
    sp.run([
        sys.executable, '-m', 'pip', 'list', '--outdated', 
        '--exclude', 'idna', '--exclude', 'mistune',
        '--exclude', 'tomli', '--format=freeze', '--user'], stdout=ofile)
Reply


Messages In This Thread
RE: PowerShell script file for updating packages - by Gribouillis - Jun-16-2022, 05:29 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020