Use pip to upgrade all Python packages (simple)

tags: Python

Upgrade all packages:

Three steps:

pip freeze > requirements.txt

After this step is completed, you will get a txt, terminal inputrequirements.txtOpen this txt, which is:

alabaster==0.7.11
anaconda-client==1.7.2
anaconda-navigator==1.9.2
anaconda-project==0.8.2
...

Then write a small program to turn these into:

alabaster
anaconda-client
anaconda-navigator
anaconda-project
...

Then the third step: 

pip install -r requirements.txt --upgrade

carry out.

 

appendix: 

List currently installed packages:

pip list

 

List the packages that can be upgraded:

pip list --outdate

 

Upgrade a package:

pip install --upgrade requests // mac, linux, unix add sudo -H before the command

 

Intelligent Recommendation

Quickly upgrade all python packages

Run the following code block to upgrade all packages with Tsinghua source...

Python upgrade pip and install opencv, moviepy packages

Create a new python directory path in environment variables python -m pip install --upgrade pip upgrade pip, pip install opencv-python install opencv package pip install moviepy installs moviepy packa...

Python uses pip to update all installed packages

First: replace pip source Python often needs to use pip install xxx to install various packages, but because foreign official pypi is often blocked by the wall, it is unavailable, so we better replace...

More Recommendation

[Python] pip updates all installation packages

Starting order:Python Bulk updateVirtual environment middle Dependent package When, if you don’t specifypip source, The default is to use the foreign official PYPI source, so the download will b...

Batch upgrade pip packages

Premise: python, pip installed If pip is slow, you need to modify the pip source: Method under Linux: Paste on Alibaba source: Just execute the following code....

Upgrade all python packages with one click

In fact, pip does not have the function of upgrading all packages with one click. Here's how to do it: Save the above code as a py file and run it. Method Source: In addition, Changing the pip upgrade...

How to upgrade all python packages in one click

How to upgrade all python packages in one click When upgrading python packages in the daily python environment, we need to upgrade one by one through the following commands, which is time-consuming an...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top