-
Hajipur, Bihar, 844101
PIP is the package installer for Python. It allows you to install and manage additional libraries and dependencies that are not part of the Python standard library.
PIP stands for Pip Installs Packages. It is used to install Python packages from PyPI (Python Package Index).
You can check if PIP is already installed by running this command in your terminal or command prompt:
pip --version
✅ Output example:pip 24.0 from ... (python 3.x)
Use the following command to install any Python package:
pip install package-name
Example:
pip install requests
Once installed, you can import and use it in your Python code:
import requests
response = requests.get("https://example.com")
print(response.status_code)
pip list
✅ This shows all packages currently installed in your Python environment.
pip show package-name
Example:
pip show numpy
pip uninstall package-name
Example:
pip uninstall flask
pip install --upgrade package-name
Example:
pip install --upgrade pandas
You can install multiple packages from a file named requirements.txt
:
pip install -r requirements.txt
✅ This is commonly used in projects to install all dependencies at once.
Q1. Write a terminal command to check your current pip version.
Q2. Write a terminal command to install the pandas
package using pip.
Q3. Write a Python program to import and use the math
package (standard library).
Q4. Write a terminal command to uninstall the flask
package from your system.
Q5. Write a terminal command to list all installed packages and check if requests
is installed.
Q6. Write a terminal command to show full details of the numpy
package using pip show.
Q7. Write a terminal command to upgrade the scikit-learn
package to the latest version.
Q8. Write a terminal command to install packages from a requirements.txt
file.
Q9. Write a terminal command to try installing a non-existent package and observe the error.
Q10. Write a terminal command to reinstall a broken package using pip.
Q1: What does PIP stand for?
Q2: Which command installs a new package using pip?
Q3: What does pip uninstall flask do?
Q4: How do you list all installed pip packages?
Q5: What does pip show numpy do?
Q6: Where does pip install packages from?
Q7: Which file helps install multiple packages at once?
Q8: Which command upgrades an installed package?
Q9: Can you use pip for Python standard libraries like math?
Q10: Which of the following is a correct pip command?