How To Use Pip (Simple Guide To Install, Update, Uninstall Packages)

How To Use Pip

Learn how to use pip, Python’s package manager, to install, update, and uninstall packages easily.

Installing Packages with pip

To install a package, use: pip install package_name Example: pip install requests

Upgrading Packages

To update an installed package to the latest version, run: pip install --upgrade package_name Example: pip install --upgrade numpy

Uninstalling Packages

To uninstall a package, use: pip uninstall package_name Example: pip uninstall requests

Checking Installed Packages

To see a list of installed packages, run: bash Copy code pip list This shows all installed packages with their versions.

Checking for Outdated Packages

Check which packages are outdated with: pip list --outdated This lists all packages that have newer versions available.