Table of contents

Upgrade a specified package using pip

Python Jun 30, 2021 Viewed 13 Comments 0

Using website video download tools such as you-get or youtube-dl will often fail to download videos due to the update strategy of the video website. Sometimes updating the package can solve the problem. If you use the pip installation method, you can easily upgrade.

pip install options

$ pip install --help
  --user                      Install to the Python user install directory for
                              your platform. Typically ~/.local/, or
                              %APPDATA%\Python on Windows. (See the Python
                              documentation for site.USER_BASE for full
                              details.)

  -U, --upgrade               Upgrade all specified packages to the newest
                              available version. The handling of dependencies

The way is:

pip install <package_name> --upgrade

or in short:

pip install <package_name> -U

You can add sudo if you need permissions.

You can also use the user flag to install it on this user only.

pip install <package_name> --upgrade --user
Updated Jun 30, 2021