1

I have installed pip using Python from cmd on Windows using get-pip.py from my downloads. It's showing installation successful. But when I verify it using pip --version, I get this error:

pip is not recognized as an internal command

More detail:

cmd snapshot

MarredCheese
  • 17,541
  • 8
  • 92
  • 91
  • 1
    Please add code and data as text ([using code formatting](//$SITEURL$/editing-help#code)), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and [many more reasons](//meta.stackoverflow.com/a/285557). Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data. – double-beep Mar 31 '19 at 15:21
  • setup the path of your windows pointing to python and pip installation directory. – BetaDev Mar 31 '19 at 15:35
  • I added both of those directories to environment variables path. I even restarted my lappy. But the problem still persists – Krishna Hemanth Oruganti Mar 31 '19 at 16:15
  • https://stackoverflow.com/search?q=%5Bpip%5D+not+recognized+as+an+internal+command – phd Mar 31 '19 at 17:30
  • Refer: [Add to PATH](https://stackoverflow.com/a/46097258/2142994) – Ani Menon May 18 '20 at 07:40

4 Answers4

5

Using pip on windows is a little different than a lot of the pip documentation. If you have Python 3.3 or higher, you can use the py python launcher for Windows:

py -m pip --version

If you have Python 3.2 or less, then try this:

python -m pip --version

If you get an error message that says: 'python' is not recognized as an internal or external command, operable program or batch file, then python is not on your system path. So you'll need to give the full path to the python executable:

c:/python27/python -m pip --version

In this example, c:/python27 is the folder where my python 2.7 version is installed.

MikeHunter
  • 4,144
  • 1
  • 19
  • 14
4

I was having a similar issue using python 3.8.

the following command fixed my issue:

python -m ensurepip --default-pip
Hyperbole
  • 3,917
  • 4
  • 35
  • 54
1
  1. Check if python is installed successfully by

py -m pip --version

  1. Next check the path where it is installed, as what you need to do is "just set the environment variable path for pip". Typically such executable files resides inside Programs\Python\Python35-32\Scripts

  2. Copy the path of Scripts folder, go to environment variable, save the path and restart your command prompt.

Dip
  • 646
  • 6
  • 8
0

You need to get the directory to the Python interpreter as well as the PIP one and insert them both into the PATH system variable. Also, try out: python -m pip install package or: py -m pip install package

Diogenis Siganos
  • 779
  • 7
  • 17