How to upgrade pip/pip3 package installer for Python


If you are using pip or pip3 package installer for Python, then you must have seen that when you do not upgrade your package utility, a warning is displayed after each time you try to install a new package or update one.

WARNING: You are using pip version 19 however version 21 is available

In order to update pip or pip3 package installer you can run the below command.

To upgrade pip package:

pip install --upgrade pip --user

To upgrade pip3 package:

pip3 install --upgrade pip --user
Example:
% pip3 install --upgrade pip --user
Collecting pip
  Using cached https://files.pythonhosted.org/packages/47/ca/d/pip-21.1.3-py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-21.1.3

Note: if you do not provide the --user parameter you might get Error 13 while updating pip

If you have the pip3 package installed and you try to use the pip command you will get the error: zsh: command not found: pip

Update pip pip3 package
Update pip pip3 package


Have Questions? Post them here!
Advertisements
Try Out Code2care Dev Tools:

Advertisements



Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Advertisements


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR - https://donate.unhcr.org/in/en-in/ukraine-emergency