You have to execute that command in a windows command prompt, not in a python shell.

Answer from Stop harming Monica on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › beginner trying to install/import pip on windows 11
r/learnpython on Reddit: Beginner trying to install/import pip on Windows 11
May 16, 2024 -

I'm about a week into my Python journey (primarily Data Camp). I want to utilize packages, which requires pip to be installed first if I'm not mistaken.

Most of my internet foraging has led me to believe pip is already included, how to check if pip is already installed, importing pip, ensurepip and get-pip.py. However I'm only getting syntax errors and dead ends, without the knowledge or vocabulary to fully understand why.

Any suggestions on where I can go from here?

Discussions

How to Install PIP for Python on Windows 11?
What are the steps to install PIP for Python on Windows 11? The goal is to use Python with Microsoft Excel and, if possible, replace VBA entirely. More on learn.microsoft.com
🌐 learn.microsoft.com
1
0
python - How do I install pip on Windows? - Stack Overflow
Find centralized, trusted content ... you use most. Learn more about Collectives ... Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... pip is a replacement for easy_install. But should I install pip using easy_install on Windows... More on stackoverflow.com
🌐 stackoverflow.com
How do I install PiP
Where are you running pip install praw?. Try running it in a normal command prompt. Also, try running py -m pip install praw instead More on reddit.com
🌐 r/learnpython
12
26
June 14, 2021
Beginner trying to install/import pip on Windows 11
Pip is always installed alongside Python these days. If you're getting a syntax error, that is almost always because you're trying to run it inside the Python console. pip is a command-line tool so you need to run it from the Windows cmd or powershell. Usually in Windows you would need to do py -m pip. More on reddit.com
🌐 r/learnpython
4
2
May 16, 2024
🌐
GitHub
gist.github.com › mkrause-nps › bcb7c75c9ea121e92f6c7982bdc170fc
Installing `pip` on Windows 10 · GitHub
Save mkrause-nps/bcb7c75c9ea121e92f6c7982bdc170fc to your computer and use it in GitHub Desktop. ... Check out details here. Check if pip is installed on your system by running: py -m pip --version
🌐
Python Packaging
packaging.python.org › tutorials › installing-packages
Installing Packages — Python Packaging User Guide
In both of the above cases, Windows users should _not_ use the source command, but should rather run the activate script directly from the command shell like so: ... Managing multiple virtual environments directly can become tedious, so the dependency management tutorial introduces a higher level tool, Pipenv, that automatically manages a separate virtual environment for each project and application that you work on...
🌐
Raspberry Pi
projects.raspberrypi.org › en › projects › using-pip-on-windows › 2
Using pip on Windows - Raspberry Pi Projects
If the the command prompt window is still open, close it and re-open it. This will make sure the changes have taken effect in the command prompt you are using. Once again, type in python at the command prompt and press the Enter key. You should now see Python start successfully. Press Ctrl + c to exit the Python shell. Now that you can use Python from the command line, you can use pip!
🌐
ActiveState
activestate.com › home › resources › quick read › how to install pip on windows
How to Install Pip on Windows - ActiveState
January 24, 2024 - This tutorial steps through how to install Pip on Windows, and explains how to keep it updated. Check if pip is already installed by running the following on the command line: ... C:usersjdoe>pip --version Pip 19.2.3 from c:usersjdoeappdatalocalprogramspythonpython38-32libsite-packagespip (python 3.8)
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-pip-on-windows
How to Install PIP on Windows - GeeksforGeeks
February 16, 2026 - PIP stands for "Preferred Installer ... dependencies not included in the standard Python library. To use PIP, you must install Python on your Windows ......
Find elsewhere
🌐
Dataquest
dataquest.io › blog › install-pip-windows
How to Install PIP on Windows (w/ Screenshots) – Dataquest
May 12, 2025 - In this tutorial, we will identify PIP for Python, when we use it, how to install it, how to check its version, how to configure it on Windows, and how to upgrade (or downgrade) it.
🌐
Microsoft Learn
learn.microsoft.com › en-ie › answers › questions › 2140635 › how-to-install-pip-for-python-on-windows-11
How to Install PIP for Python on Windows 11? - Microsoft Q&A
I found the easiest way to install Python on Windows 11 is to follow the instructions here. https://learn.microsoft.com/en-us/windows/python/beginners. You can test if it's working using Windows Powershell, Command Prompt(CMD), and VCode. Using Windows Powershell and Command Prompt you can type in Python and it displays, and use command tests to ensure Python and PIP were installed.
🌐
Educative
educative.io › answers › how-to-install-pip-on-windows
How to install pip on Windows
Scroll down to the “Files” section, and under “Windows installer (64-bit)” or “Windows installer (32-bit),” click the link to download the installer. Once the installer is downloaded, locate the file (e.g., python-3.9.x-amd64.exe for the 64-bit version), and double-click it to run the installer. Check the box “Add Python x.x to PATH” during the installation. This option will add Python to our system’s environment variables, allowing us to use Python and pip from the Command Prompt easily.
🌐
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 it if you’re not sure. Keep in mind that, on Windows, PIP must be run with the following command, which uses Python 3 to invoke PIP:
🌐
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.
🌐
AvenaCloud
avenacloud.com › home › how to install pip on windows 10, 11
How To Install Pip On Windows — 10, 11 Step-by-Step Guide
October 28, 2025 - Download the Windows installer from the official Python site: Python · Run the installer. On the first screen, check the box “Add Python X.X to PATH”. Choose “Install Now” or “Customize installation”. If customizing, on Optional Features ensure “pip” is checked. Complete the install and open a new Command Prompt to confirm: ... This method is the one I recommend to most users ...
Address   Muncesti 364, 2002, Chisinau
🌐
Liquid Web
liquidweb.com › home › how to install pip on windows
How to Install PIP on Windows in 5 Steps | Liquid Web
You can choose one of two methods to install PIP on Windows. Download PIP with get-pip.py to a folder on your computer. Open a command prompt and navigate to the folder containing the get-pip.py installer. ... PIP should now be installed successfully. If we receive a “file not found” error, ...
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 :)

🌐
Hostman
hostman.com › tutorials › how to install pip on windows
How to Install pip on Windows: Step-by-Step Guide
January 15, 2025 - Here are the guidelines to set up pip on a Windows machine. Verify Python is operational on your device before starting the pip setup. To carry out this operation, run command prompt and apply: ... If Python's not present on your system, download it from the official site. Python's standard installation package automatically includes pip. However, in case of accidental removal, grab the get-pip.py script. You have a couple of options: either visit the pip.py webpage, or use ...
Price   $
Address   1999 Harrison St 1800 9079, 94612, Oakland
🌐
DEV Community
dev.to › el_joft › installing-pip-on-windows
how to install pip: Installing pip on Windows - DEV Community
October 11, 2022 - 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 ... 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.
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to install pip on windows
How to Install pip on Windows
March 24, 2025 - ... Note it because you will need it in the coming steps. 2. Open the Start menu, search for Environment Variables, and press Enter. ... Note: Modify User variables for a single user or System variables to apply changes for all users.
🌐
AlexHost
alexhost.com › home › faq › how to install pip on windows
How to Install PIP on Windows
December 4, 2025 - In the Edit Environment Variable window, click New and paste the path to the PIP installation directory (e.g., C:\Python39\Scripts\). Click OK to save the changes. ... You should now be able to run PIP commands without any issues. To ensure that PIP is working correctly, let’s install a simple Python package. For this example, we’ll install the requests library, which is a popular library for making HTTP requests in Python. Open Command Prompt. ... Once installed, you can test it by opening the Python interpreter and importing the requests module: