pip is a free and open source Python package manager for Linux, macOS, Windows and Unix. Using pip you can easily install and manage python packages from Python Package Index (PyPI) online repository or any other indexes on your system. It is released under MIT license. In this tutorial i am going to install pip python package manager for Python 3 and Python 2.
Note: Python 2 officially in end-of-life and Python 2.7.18 is the last stable release of Python 2, released on April 20, 2020. Python 2 is not installed by default on Ubuntu 20.04. So Python users please switch to Python 3.
Install pip Python Package Manager on Ubuntu:
You don’t need to install Python 3 on Ubuntu, it comes as per-installed with Ubuntu. You can check the installed python 3 version by below in terminal.
python3 --version
Install pip for Python 3:
Open your terminal app (ctrl+alt+t) and run this command to update your Ubuntu source list.
sudo apt update
Enter your Ubuntu password. Then this pip installation command.
sudo apt install python3-pip
Then verify your pip installation with this command.
pip3 --version
Install pip for Python 2:
First check if python 2 comes with your system with this command.
python --version
If you get “Command ‘python’ not found“, then you need to install python 2 first. Enable the ubuntu universe repository. You can enable via below command also.
sudo add-apt-repository universe
Then enter the below command in terminal and install python 2.
sudo apt install python2
Then install curl on your system if you don’t have.
sudo apt install curl
Then download the pip installer script.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Then run this command to install pip for python 2.
sudo python2 get-pip.py
It will also install setuptools and wheel. check the installed version by
pip --version
PIP Usage:
pip3 --help
Example:
Install python package via pip
sudo pip3 install PACKAGENAME
Uninstall python package via pip
sudo pip3 uninstall PACKAGENAME
That’s all.
Pingback: ReText – Markdown and reStructuredText Text Editor | CONNECTwww.com
Pingback: RainbowStream Terminal based Twitter Client | CONNECTwww.com
Pingback: Visualize Disk Space and Usage in Terminal With Vizex | CONNECTwww.com
Pingback: Halo Weather App Forecast and Historic Temperature Trends | CONNECTwww.com
Pingback: How to install Thonny Python IDE on Ubuntu | CONNECTwww.com
Pingback: HTTPie command-line HTTP client – Install HTTPie on Ubuntu | CONNECTwww.com
Pingback: Sysmon Linux System Activity Monitor – Install Sysmon on Ubuntu | CONNECTwww.com
Pingback: How to install AutoKey on Ubuntu – Automate Repetitive Typing | CONNECTwww.com
Pingback: How to install ddgr DuckDuckGo search on Ubuntu – Search DuckDuckGo from Linux Terminal | CONNECTwww.com
Pingback: How to install Guake Terminal On Ubuntu – Drop Down Linux Terminal | CONNECTwww.com