Extra 5% OFF Use Code: OL05
Free Shipping over โ‚น999

PIP

๐Ÿ› ๏ธ What is pip?

pip is Python’s package manager.
It helps you install, update, and uninstall external Python libraries.

Think of it like the Play Store or App Store, but for Python packages.

โœ… Why Use pip?

Python has many useful libraries (packages) like:

  • numpy โ€“ for math
  • pandas โ€“ for data
  • flask โ€“ for web apps
  • requests โ€“ for internet requests

You can install any of these using pip!

๐Ÿงช Basic Commands

CommandWhat It Does
pip install package_nameInstalls a package
pip uninstall package_nameRemoves a package
pip listShows all installed packages
pip show package_nameDetails of a specific package

๐Ÿ“ฆ Example: Installing a Package

Let’s install the requests package (used to make web requests):

pip install requests

โœ… After that, you can use it in Python:

import requests

response = requests.get("https://example.com")
print(response.status_code)

๐Ÿšซ Uninstall a Package

pip uninstall requests

๐Ÿ”Ž See Installed Packages

pip list

โ“ Where to Run These Commands?

Run pip commands in your terminal or command prompt:

  • Windows: Command Prompt or PowerShell
  • Mac/Linux: Terminal

๐Ÿ›  Bonus Tip: Check pip version

pip --version

If pip isn’t working, you may need to install or upgrade it using:

python -m ensurepip --upgrade

๐ŸŽฏ Summary

  • pip = Python package installer
  • Installs useful libraries from the Python community
  • You run it in the terminal, not inside a Python file

    Leave a Reply

    Your email address will not be published.

    Need Help?