A package is a piece of software that provides particular features while programming. A package contains all the resources which a module requires. Modules are sets of Python code that we can add to our project. Python
pip is the package manager for Python packages.
pip comes pre-installed on 3.4 or older versions of Python,
pip commands are used in the command prompt.
The basic syntax of
pip commands in command prompt is:
Some of the most commonly used
pip commands are:
- Check pip version: We can check the pip version in our system by using the below command.
- Install packages: We can install additional packages by using the below command.
<pip install numpy
Example 1: When the required package is not installed.
Example 2: When the required package is already installed.
We can also install the package of a specific version.
pip install package_name==version
- Display package information: We can use the below command to display the details of a particular package.
pip show numpy
- List installed packages: The below command displays a list of packages installed in the system.
- Uninstall packages: The below command uninstall a particular existing package.
pip uninstall numpy
- Search packages: We can search for a particular existing package using pip.
pip search numpy
- Using requirement files: Checks if a required package is present in the system, if not then they are installed. Suppose
requirements.txthas the below contents:
pip install -r requirements.txt
- Listing additional packages: The
freezecommand is used to list packages that don’t come pre-installed with Python.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- How to install PIP on Windows ?
- How to install PIP in Linux?
- Download and install pip Latest Version
- How to install pip in macOS ?
- Important differences between Python 2.x and Python 3.x with examples
- Python | Set 4 (Dictionary, Keywords in Python)
- Python | Sort Python Dictionaries by Key or Value
- Python | Merge Python key values to list
- Reading Python File-Like Objects from C | Python
- Python | Add Logging to a Python Script
- Python | Add Logging to Python Libraries
- Python | Visualizing O(n) using Python
- Python | Index of Non-Zero elements in Python list
- Python | Convert list to Python array
- MySQL-Connector-Python module in Python
- Python - Read blob object in python using wand library
- Python | PRAW - Python Reddit API Wrapper
- twitter-text-python (ttp) module - Python
- Reusable piece of python functionality for wrapping arbitrary blocks of code : Python Context Managers
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.