Python PIP
pip stands for Package Installer for Python. It is used to install and manage software packages in Python that are not part of the standard Python library.
In the later versions of Python (3.4 and after), the pip command is pre-installed.
To check if pip is installed in your system, type the following in the command prompt:
pip --version
pip 22.2 from C:\users\yourName\appdata\local\programs\python\python39\lib\site-packages\pip (python 3.9)
If your system does not have pip installed, you can easily download it from their official website: https://pypi.org/project/pip/
Now that pip has been installed in our system, we can download packages in the system.
Example:
PS D: \Python\Codes> pip install numpy
Collecting numpy
Downloading numpy-1.23.1-cp39-cp39-win_amd64.whl (14.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.7/14.7 MB 2.9 MB/s eta 0:00:00
Installing collected packages: numpy
If the package already exists then the following message is displayed:
PS D:\Python\Codes> pip install sklearn
Requirement already satisfied: sklearn in c:\users\yourName\appdata\local\programs\python\python39\lib\site-packages (0.0)
To list all the installed packages:
PS D:\Python\Codes> pip list
Package Version
--------------------------------- -------------------
Flask 2.0.3
ipython 8.0.1
jupyter 1.0.0
keras 2.8.0
Kivy 2.0.0
matplotlib 3.4.3
mysql-connector 2.2.9
numpy 1.19.5
pandas 1.4.1
pip 22.2
plotly 5.6.0
pygame 2.0.0
scipy 1.7.1
seaborn 0.11.2
selenium 3.141.0
sklearn 0.0
sympy 1.10
tensorflow 2.8.0