Python pip

pip is the standard package manager for Python that allows you to install, upgrade, and manage external packages from the Python Package Index (PyPI) and other repositories. Here’s a quick guide on how to use pip:

Installing a Package

To install a package, use the command:


pip install package_name

Example:


pip install requests

Installing a Specific Version

To install a specific version of a package, specify the version number:


pip install package_name==version_number

Example:


pip install numpy==1.21.0

Upgrading a Package

To upgrade an already installed package to the latest version, use:


pip install --upgrade package_name

Example:


pip install --upgrade pandas

Uninstalling a Package

To remove an installed package:


pip uninstall package_name

Example:


pip uninstall requests

Listing Installed Packages

To list all installed packages and their versions:


pip list