Python PIP
Introduction
PIP (Python Package Index) is a package management system used to install and manage software packages written in Python.
It simplifies the process of installing and managing dependencies for Python projects.
Check PIP version
For most modern distributions of Python 3, PIP comes pre-installed. You can check if it's installed by opening a command prompt (or terminal on macOS/Linux) and typing:
pip --version
If PIP is installed, it will display the version number. If not, you may need to install it manually.
Install PIP
For Windows
To install pip on Windows, download and install from https://pypi.org/project/pip/
For macOS/Linux
- Use the following command in your terminal:
sudo apt-get install python3-pip
python3 -m pip install --upgrade pip
Using pip
- Installing a Package:
pip install package_name
pip install package_name==version_number
pip install --upgrade package_name
pip uninstall package_name
pip list
pip install -r requirements.txt