Is it possible to upgrade all Python packages at one time with pip?
Note: that there is a feature request for this on the official issue tracker.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There isn’t a built-in flag yet. Starting with pip version 22.3, the
--outdatedand--format=freezehave become mutually exclusive. Use Python, to parse the JSON output:If you are using
pip<22.3you can use:For older versions of
pip:The
grepis to skip editable ("-e") package definitions, as suggested by @jawache. (Yes, you could replacegrep+cutwithsedorawkorperlor…).The
-n1flag forxargsprevents stopping everything if updating one package fails (thanks @andsens).Note: there are infinite potential variations for this. I’m trying to keep this answer short and simple, but please do suggest variations in the comments!