Little side note for anyone new to Python who didn't figure it out by theirself: this should be automatic when installing Python, but just in case, note that to run Python using the python command in Windows' CMD you must first add it to the PATH environment variable, as explained here.

If you have the Python launcher installed, in such case instead of typing python in the console you can type py. Whether or not one or both commands are available depends on the choices you made during installation.


To execute Pip, first of all make sure you have it installed, so type in your CMD:

> python
>>> import pip
>>>

The above should proceed with no error. Otherwise, if this fails, you can look here to see how to install it. Now that you are sure you've got Pip, you can run it from CMD with Python using the -m (module) parameter, like this:

> python -m pip <command> <args>

Where <command> is any Pip command you want to run, and <args> are its relative arguments, separated by spaces.

For example, to install a package:

> python -m pip install <package-name>
Answer from Marco Bonelli on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › using pip in the command prompt
r/learnpython on Reddit: Using pip in the command prompt
August 31, 2022 -

Okay, so I haven't been able to find a similar thing online, so here's the problem.

To use pip I have to type this: py -m pip

using just pip in the terminal does not work. The tutorials that I have seen say that to test if pip is installed you should just be able to type pip into the command window and see information. This does not happen for me, but typing in py -m pip, it does seem to work, and I can download packages using pip doing this.

🌐
Reddit
reddit.com › r/learnpython › how to...pip install?
r/learnpython on Reddit: How to...pip install?
April 5, 2024 -

Never thought I'd need to ask this question as a CCNA and Network+ holder, I guess Python has decided to make the simple act of a pip install THIS difficult, wow! I have Python installed as well as Virtual Studio Code. I try this from command prompt

pip3 install requests
File "<stdin>", line 1
pip3 install requests
^^^^^^^

And that's all I get, again and again and again. So I try this in the Visual Studio terminal:

pip3 : The term 'pip3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 

spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • pip3 install requests

  •   + CategoryInfo          : ObjectNotFound: (pip3:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
      
    

Mind blowing stuff here. I JUST want to be able to pip install. I've also tried just using "pip" and leaving out the 3. What mountains must I move to perform such a basic task? I

🌐
pip
pip.pypa.io › en › stable › cli
Commands - pip documentation v26.0.1
How pip is used in interactive environments (i.e. CI, CD) ... The general options that apply to all the commands listed below can be found under the pip page in this section.
🌐
Packagecloud
blog.packagecloud.io › everything-you-want-to-know-about-pip
The pip commands you will use the most in Python | Packagecloud Blog
Now use the following command to install all the packages mentioned in the requirements.txt file. ... You can upgrade pip to install the latest version.
🌐
W3Schools
w3schools.com › python › python_pip.asp
Python PIP
Open the command line interface and tell PIP to download the package you want. Navigate your command line to the location of Python's script directory, and type the following: ... Now you have downloaded and installed your first package!
🌐
pip
pip.pypa.io › en › stable › installation
Installation - pip documentation v26.0.1
Open a terminal/command prompt, cd to the folder containing the get-pip.py file and run: ... More details about this script can be found in pypa/get-pip’s README. ... The zip application is currently experimental. We test that pip runs correctly in this form, but it is possible that there could be issues in some situations. We will accept bug reports in such cases, but for now the zip application should not be used in production environments.
🌐
Python Packaging
packaging.python.org › tutorials › installing-packages
Installing Packages — Python Packaging User Guide
Due to the way most Linux distributions are handling the Python 3 migration, Linux users using the system Python without creating a virtual environment first should replace the python command in this tutorial with python3 and the python -m pip command with python3 -m pip --user.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-install-pip-on-windows
How to Install PIP on Windows - GeeksforGeeks
February 25, 2025 - Let's understand this in the ... testing REST APIs, etc. Note: It will download the get-pip.py file. ... Press Win + R and type CMD and hit ......
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to install pip on windows
How to Install pip on Windows
March 24, 2025 - To run pip from any location and as a standalone command, add it to Windows environment variables. Before modifying environment variables, check whether pip is already in your system's PATH. Run this command: ... If the command returns a valid PATH, skip this step. If the command cannot find the PATH, it returns the error: ... 1. Locate the pip installation directory, which is, by default, in the Scripts subdirectory of your Python installation. A typical path is: C:\Users\[YourUsername]\AppData\Local\Programs\Python\PythonXX\Scripts
🌐
Liquid Web
liquidweb.com › home › how to install pip on windows
How to Install PIP on Windows in 5 Steps | Liquid Web
This tutorial will show how to install PIP, check its version, and configure it for use. ... Watch the video below or get started with step 1 now. ... Note: To open a Windows command prompt, press the “Windows Key+R” to open a “Run” dialog box. Next, type in “cmd”, and then click “OK”. This open a normal Command Prompt.
Published   June 9, 2025
Top answer
1 of 16
1967

Python 3.4+ and 2.7.9+

Good news! Python 3.4 (released March 2014) and Python 2.7.9 (released December 2014) ship with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded from using community libraries by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Node.js, Haskell, Perl, Go—almost every other contemporary language with a majority open-source community. Thank you, Python.

If you do find that pip is not available, simply run ensurepip.

  • On Windows:

    py -3 -m ensurepip
    
  • Otherwise:

    python3 -m ensurepip
    

Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this in the Stack Overflow question Does Python have a package/module management system?.

Python 3 ≤ 3.3 and 2 ≤ 2.7.8

Flying in the face of its 'batteries included' motto, Python ships without a package manager. To make matters worse, Pip was—until recently—ironically difficult to install.

Official instructions

Per https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip:

Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt:

python get-pip.py

You possibly need an administrator command prompt to do this. Follow Start a Command Prompt as an Administrator (Microsoft TechNet).

This installs the pip package, which (in Windows) contains ...\Scripts\pip.exe that path must be in PATH environment variable to use pip from the command line (see the second part of 'Alternative Instructions' for adding it to your PATH,

Alternative instructions

The official documentation tells users to install Pip and each of its dependencies from source. That's tedious for the experienced and prohibitively difficult for newbies.

For our sake, Christoph Gohlke prepares Windows installers (.msi) for popular Python packages. He builds installers for all Python versions, both 32 and 64 bit. You need to:

  1. Install setuptools
  2. Install pip

For me, this installed Pip at C:\Python27\Scripts\pip.exe. Find pip.exe on your computer, then add its folder (for example, C:\Python27\Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:

pip install httpie

There you go (hopefully)! Solutions for common problems are given below:

Proxy problems

If you work in an office, you might be behind an HTTP proxy. If so, set the environment variables http_proxy and https_proxy. Most Python applications (and other free software) respect these. Example syntax:

http://proxy_url:port
http://username:password@proxy_url:port

If you're really unlucky, your proxy might be a Microsoft NTLM proxy. Free software can't cope. The only solution is to install a free software friendly proxy that forwards to the nasty proxy. http://cntlm.sourceforge.net/

Unable to find vcvarsall.bat

Python modules can be partly written in C or C++. Pip tries to compile from source. If you don't have a C/C++ compiler installed and configured, you'll see this cryptic error message.

Error: Unable to find vcvarsall.bat

You can fix that by installing a C++ compiler such as MinGW or Visual C++. Microsoft actually ships one specifically for use with Python. Or try Microsoft Visual C++ Compiler for Python 2.7.

Often though it's easier to check Christoph's site for your package.

2 of 16
310

-- Outdated -- use distribute, not setuptools as described here. --
-- Outdated #2 -- use setuptools as distribute is deprecated.

As you mentioned pip doesn't include an independent installer, but you can install it with its predecessor easy_install.

So:

  1. Download the last pip version from here: http://pypi.python.org/pypi/pip#downloads
  2. Uncompress it
  3. Download the last easy installer for Windows: (download the .exe at the bottom of http://pypi.python.org/pypi/setuptools ). Install it.
  4. copy the uncompressed pip folder content into C:\Python2x\ folder (don't copy the whole folder into it, just the content), because python command doesn't work outside C:\Python2x folder and then run: python setup.py install
  5. Add your python C:\Python2x\Scripts to the path

You are done.

Now you can use pip install package to easily install packages as in Linux :)

🌐
Sentry
sentry.io › sentry answers › windows › install python pip on windows
Install Python PIP on Windows | Sentry
June 15, 2023 - To run ensurepip, open a command prompt window and execute the following command: ... Once this command has run, PIP should be installed and available. If PIP is already installed, the command will do nothing, so there is no harm in running ...
🌐
Dataquest
dataquest.io › blog › install-pip-windows
How to Install PIP on Windows (w/ Screenshots) – Dataquest
May 12, 2025 - To verify that Python is available ... need to open the command line (in Windows search, type cmd and press Enter to open Command Prompt or right-click on the Start button and select Windows PowerShell), type python, and press Enter...
🌐
Python
docs.python.org › 3 › installing › index.html
Installing Python modules — Python 3.14.4 documentation
For Windows users, the examples in this guide assume that the option to adjust the system PATH environment variable was selected when installing Python. It’s also possible to specify an exact or minimum version directly on the command line. When using comparator operators such as >, < or some other special character which get interpreted by shell, the package name and the version should be enclosed within double quotes: python -m pip install SomePackage==1.0.4 # specific version python -m pip install "SomePackage>=1.0.4" # minimum version
🌐
Appuals
appuals.com › home › microsoft windows › windows troubleshooting
How to Fix "pip is not recognized as an internal or external command" Error?
July 18, 2024 - Prefacing your pip command with python -m explicitly directs Python to run the pip module as a script. Press Windows key + R to open a Run dialog box. Type cmd and press Enter to open a Command Prompt window.