How to Install Python PIP on Windows, Mac, and Linux

By | March 3, 2020

Third-party libraries and packages are the main assets of Python programming language, the standard python itself do not have many libraries and packages for the developers but these third-party libraries give a boost to the python programming. Python is well known for its simplicity and ease, that’s why it also makes sure that you can easily install any third-party package and library for your project just by writing a simple one-line pip command. In python you do not need to manage any of the installed packages, pip will take care of everything.

What is PIP?

PIP stands for “Preferred Installer Program” and it is a command-line utility that helps you to manage your python third party packages. By using the pip command, you can install, reinstall, update and uninstall your PyPI package.

If you want to install packages such as NumPy, pandas, TensorFlow, etc. for your project, you just need to open your command prompt or terminal on your system and type the pip install command to install any package or Library which are at PyPI.

What is PyPI?

PyPI stands for “Python Package Index” and it is the official central library for all the python packages, which means it consists of all the registered and licensed python packages. PiP itself uses the PyPI as the source to install all the python packages, by now PyPI has more than 130,000 packages on its repository.

Do I Need to install PIP?

If you are using the Python 2.7(or greater) Or Python 3.4(or greater) versions of python then you do not need to install PIP, because by default Python comes with a compatible version of PIP.

How to check the version of python installed on my system?

Open your Command prompt (Windows) or terminal (mac, Linux) and write this command.

python –version

How to check the version of pip installed on my system?

Open your Command prompt (Windows) or terminal (mac, Linux) and write this command.

pip –version

Only if you are using the old version of python then you required to install pip separately.

If you are using the old version of python, we suggest you to download the latest version of it. Follow this link to download the latest version of Python.

Python Download Link: https://www.python.org/downloads/

If you are using a virtual environment and want to use the old version of Python and pip then you have to install PIP separately.

How to install pipi on windows?

It’s very easy to install pip on windows you just need to install a python file and run it using the command prompt, make sure you must have the old version of python to run this file.

Follow these steps to install pip on windows.

  • Download the get-pip.py installer script and save it as a python file by name get-pip.py. If you are using the old Python 3.2 version, download this python file as get-pip.py and save it on your system.
  • Now open your command prompt ((win+r) + cmd) and navigate to the get-pip.py downloaded file.
  • Use command python get-pip.py and run the file.
  • Now you have installed pip on your windows successfully
  • Use pip –version command to check the version of pip.

How to install pip on Mac?

Mac is the only operating system which comes with the preinstalled latest version of python and pip. But if you have the old version of python and want to install pip on your mac, you just need to write a simple terminal command to install pip for the corresponding version of installed python.

sudo easy_install pip

How to install pip on Linux?

Like other operating systems if you have the latest version of Python you would not need to install pip, but if you are using the old version of python you may have to install the pip separately. As compared to Windows and Mac it is a bit different to install pip on the Linux system because it has different command lines for a different version of python.

Python Versions Linux command to install pip
Advanced Package Tool (Python 2.x)
sudo apt-get install python-pip
Advanced Package Tool (Python 3.x)
sudo apt-get install python3-pip
pacman Package Manager (Python 2.x)
sudo pacman -S python2-pip
pacman Package Manager (Python 3.x)
sudo pacman -S python-pip
Yum Package Manager (Python 2.x)
sudo yum upgrade python-setuptoolssudo yum install python-pip python-wheel
Yum Package Manager (Python 3.x)
sudo yum install python3 python3-wheel
Dandified Yum (Python 2.x)
sudo dnf upgrade python-setuptoolssudo dnf install python-pip python-wheel
Dandified Yum (Python 3.x)
sudo dnf install python3 python3-wheel
Zypper Package Manager (Python 2.x)
sudo zypper install python-pip python-setuptools python-wheel
Zypper Package Manager (Python 3.x)
sudo zypper install python3-pip python3-setuptools python3-wheel

How to Install PIP on Raspberry Pi?

Terminal commands:

For old versions of Python 2.x:

sudo apt-get install python-pip

For old versions Python 3.x:

sudo apt-get install python3-pip

Top Pip Commands

Pip Command Description
pip install <package_name> Install package
pip download <package_naem> Download package
pip uninstall <package_naem> Uninstall packages
pip freeze Output installed packages in requirements format.
pip list List installed packages.
pip show Show information about installed packages.
pip check Verify installed packages have compatible dependencies.
pip config Manage local and global configuration.
pip search Search PyPI for packages.
pip wheel Build wheels from your requirements.
pip hash Compute hashes of package archives.
pip completion A helper command used for command completion.
pip debug Show information useful for debugging.
pip help Show help for commands.

Conclusion

You do not need to install pip if you have the latest version of Python if pip is not functional on your system just reinstall the python with the latest version that may solve the pip problem. It always suggested that rather than installing pip separately install the latest version of python and you will get the compatible version of pip.

If you like this article and have any suggestions feel free to comment down below.

Leave a Reply

Your email address will not be published. Required fields are marked *