pip: Python Package Installer
pip is the standard package manager for Python. It allows you to install and manage packages that are not part of the Python standard library. These packages can be found in the Python Package Index (PyPI).
Key Features:
- Package Installation: Easily install packages from PyPI and other indexes using commands like
pip install <package_name>
.
- Dependency Management: pip handles dependencies automatically, ensuring that required packages are installed along with the main package.
- Version Control: You can specify package versions during installation (e.g.,
pip install <package_name>==<version>
), which is crucial for reproducibility.
- Virtual Environments: pip is commonly used in conjunction with virtual%20environments to isolate project dependencies.
- Requirements Files: Manage dependencies using
requirements.txt
files, allowing you to install all project dependencies with pip install -r requirements.txt
.
- Package Uninstallation: Remove packages with
pip uninstall <package_name>
.
- Package Listing: List installed packages with
pip list
.
- Package Information: Get information about a specific package using
pip show <package_name>
.
- Upgrading Packages: Upgrade packages to the latest version with
pip install --upgrade <package_name>
.
pip simplifies the process of adding external libraries and tools to your Python projects, making it an essential tool for Python developers.