DEV Community


how to install pip Installing pip on Windows

el_joft profile image el-joft ・3 min read

Note: "the newest versions of python comes with pip but older version has to be installed by the user."

Before you install pip on your computer, make sure python has been installed on your computer. You can verify this by opening a command prompt terminal (CMD) on windows using search in Windows 7. Then click the Command Prompt search result.

For Windows 8.1, switch to the Start screen and type command or cmd.
In Windows 10, you can use Cortana to search for, and launch the Command Prompt terminal. Inside Cortana's search field, enter command or cmd. Then click or tap on the Command Prompt result.

Another way to launch the Command Prompt is to use the Run Window (press Win+R) on your keyboard and type in CMD, press enter or OK to open it.

In your command prompt terminal, type in


and what you get should look like this:

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

If you get an error message like this:

python is not recognized as an internal or external command, operable program or batch file.

Then it means that python has not been installed on your computer or probably python is not saved in the path environment variable of your computer, so you cannot run Python from any location without having to constantly reference the full installation path name. Make sure to check my write-up on how to install python on windows.

To install pip, download via to a directory on your computer.

Note: Your browser might open the code for you, just copy and paste the python code into a fresh python IDLE (GUI), then save it as

After that, navigate into the directory in your command prompt window and run


To verify a successful installation in your command prompt, navigate into C:\Python27\Scripts, then run

pip --version

you should get:

pip 9.0.1 from c:\python27\lib\site-packages (python 2.7)

By now, you have successfully installed pip on your computer, but there is one more step to go! You need to save pip in the path environment so that you can run pip from any location without having to constantly reference the full installation path name as it was earlier referenced in c:\Python27\Scripts.

Use the search on windows 7 and 8, or Cortana in windows 10 to find environment variables. Another way to get to the environment variables is by using the file explorer and locate This PC. Right click and select properties, the control panel home as shown below will open. Click the Advanced system settings.

When you click on edit the system environment variables, you should see:

When you click on environment variables, you get something like this:

Find the system variable called path, then click edit. Create a new variable, add the pip installed directory C:\Python27\Scripts into the new environment variable and click OK.

To verify the creation of a new environment variable, open your CMD terminal and run this:

pip --version

It will show you the pip version installed on your computer and you should see this:

Pip 9.0.1 from c:\python27\lib\site-packages (python 2.7).

Note: the version of the pip install might vary with time as updates are being made.

Finally, run pip freeze to verify all the packages installed with pip
The result will be:


Written by Timothy Fehintolu.
Follow on twitter @el_joft


Editor guide
smeysama profile image

hi el-joft
i did your tutorial but i'm getting message down:

C:\Python27\Lib\site-packages>pip list
DEPRECATION: The default format will switch to columns in the future. You can us
e --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.con
f under the [list] section) to disable this warning.
pip (9.0.1)
setuptools (38.4.0)
virtualenv (15.1.0)
wheel (0.30.0)

C:\Python27\Lib\site-packages>pip freeze

for update show message down:
C:\Python27\Scripts>python -m pip install -U pip
Requirement already up-to-date: pip in c:\python27\lib\site-packages


C:\Python27>python -m pip install --upgrade pip setuptools wheel
Requirement already up-to-date: pip in c:\python27\lib\site-packages
Requirement already up-to-date: setuptools in c:\python27\lib\site-packages
Requirement already up-to-date: wheel in c:\python27\lib\site-packages

bilal26036 profile image

i am following your tutorial but i am getting error.

Requirement already up-to-date: pip in c:\program files (x86)\paython 3.6.1\lib\site-packages
Collecting wheel
Using cached wheel-0.30.0-py2.py3-none-any.whl
Installing collected packages: wheel
Traceback (most recent call last):
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\", line 215, in main
status =, args)
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\commands\", line 342, in run
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\req\", line 784, in install
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\req\", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\req\", line 1064, in move_wheel_files
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\", line 316, in clobber
File "C:\Users\ARSALA~1\AppData\Local\Temp\tmpcb1hb02_\\pip\", line 83, in ensure_dir
File "C:\Program Files (x86)\paython 3.6.1\lib\", line 220, in makedirs
mkdir(name, mode)
PermissionError: [WinError 5] Access is denied: 'C:\Program Files (x86)\paython 3.6.1\Lib\site-packages\wheel'[0m

ghost profile image

There is a good chance that the Python Scripts directory was already added to your PATH, when you installed Python.

pranavvaid profile image

Worked like a charm. Really appreciated it. Thanks to the Dev!!

el_joft profile image
el-joft Author

you are welcome

mikennani profile image
Micheal Uchenna Nnani

Thanks, man. it worked

ghost profile image

just copy and paste the python code into a fresh python IDLE (GUI)

Any text editor will do. Just make sure you have the correct file extension after saving.

ghost profile image


The "." on the end is a typo, I think.