edit: Manual installation and use of is not the standard process anymore.setuptools
Congrats, you should already have installed. If you do not, read onward.pip
You can usually install the package for through your package manager if your version of Python is older than 2.7.9 or 3.4, or if your system did not include it for whatever reason.pip
Instructions for some of the more common distros follow.
Run the following command from a terminal:
sudo apt-get install python-pip
Run the following command from a terminal:
sudo apt-get install python3-pip
Note:On a fresh Debian/Ubuntu install, the package may not be found until you do:
sudo apt-get update
pip on CentOS 7 for Python 2.xOn CentOS 7, you have to install setup tools first, and then use that to install , as there is no direct package for it.pip
sudo yum install python-setuptools
sudo easy_install pip
pip on CentOS 7 for Python 3.xAssuming you installed Python 3.4 from EPEL, you can install Python 3's setup tools and use it to install .pip
# First command requires you to have enabled EPEL for CentOS7
sudo yum install python34-setuptools
sudo easy_install pip
Install using the manual way detailed below.
If you want to do it the manual way, the now-recommended method is to install using the script from get-pip.py's installation instructions.pip
Install pip
To install pip, securely download
get-pip.pyThen run the following (which may require administrator access):
python get-pip.pyIf
is not already installed,setuptoolswill install setuptools for you.get-pip.py
Tkinter isn't distributed through pip; if it didn't come pre-packaged with Python, you have to get it from elsewhere:
sudo apt-get install python3-tk
sudo dnf install python3-tkinter
brew install python-tk
When you have both version 2 and 3 installations and pip differentiate the target installtion.pip3
For installing anything on Python 3(versions 3.5 and above) use pip3
for Python 2.7 use pip
Make sure python path is set in environment variables too.
also you can use or where pip as @mshsayem mentioned.which pip
Additional Reference