Python Tutorial

Introduction

Edit Template

Python Tutorial

Introduction

Edit Template

Python PIP

When you want to use external Python libraries—like NumPy, Pandas, or TensorFlow—you don’t write the code from scratch. Instead, you install them using pip, Python’s built-in package manager.

What is PIP?

PIP stands for Package Installer for Python. It helps you install, upgrade, and manage third-party Python libraries from the Python Package Index (PyPI).

If you’re using Python 3.4 or newer, pip is likely already installed.

Check if PIP is Installed

Open your command prompt (or terminal) and type:

				
					pip --version


				
			

Output:

				
					pip 23.1 from C:\Users\Arshyan\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip (python 3.11)

				
			

If you don’t get a version number, you can install pip manually from:

https://pypi.org/project/pip

Installing a Python Package

Once pip is installed, you can easily install libraries using the command:

				
					pip install package-name




				
			

 Example:

				
					pip install pandas

				
			

Output:

				
					Collecting pandas
  Downloading pandas-2.0.3-cp311-cp311-win_amd64.whl (11.5 MB)
Installing collected packages: pandas
Successfully installed pandas-2.0.3

				
			

Already Installed?

If the library is already installed, pip will notify you:

				
					pip install matplotlib


				
			

Output:

				
					Requirement already satisfied: matplotlib in c:\python311\lib\site-packages (3.8.0)

				
			

List Installed Packages

You can see all installed packages with:

				
					pip list

				
			

Output:

				
					Package           Version
----------------- -------
flask             2.2.5
matplotlib        3.8.0
numpy             1.25.2
pandas            2.0.3
pygame            2.1.0
requests          2.31.0
scikit-learn      1.3.1
seaborn           0.12.2
tensorflow        2.13.0

				
			

Summary

  • pip helps you install external libraries.

  • Use pip install, pip list, and pip --version to manage packages.

  • It’s a core part of real-world Python development.

You’ll use pip often when working with libraries like NumPy, Pandas, Matplotlib, Django, Flask, and many more.

Scroll to Top