Batch Update Python library with PIP

Source: Internet
Author: User

If the Python library is older and needs to be updated to the latest version, you can take advantage of the PIP tool.

DOS command line, enter pip-v to view the PIP version, you can first update the PIP to the new version.

View outdated Python libraries in your system

pip list   --outdated #列出所有过期的库

For the list of expired libraries, PIP provides an update command for a single library

Install --upgrade Library name

However, this command does not support global full library upgrades.

The bulk Update method is available here ( Note:pip install--upgrade The last space cannot be omitted )

DOS command line input python into the Python environment, and then use the following Python code to implement the Bulk Update Tool library

Import pipfrom subprocess import Call  for inch pip.get_installed_distributions (): Call    ("" + dist.project_name, shell= True)

Batch Update Python library with PIP

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.