0

I'm having problems installing modules using pip in my Python 3.6. I've watched countless videos and read numerous posts about it amounting to nothing but frustration.

When I use pip in the CMD, it says:

C:\WINDOWS\system32>pip

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

alexandresaiz
  • 2,678
  • 7
  • 29
  • 40
  • The error you're getting isn't related to python or pip - it's a general windows error. Try mashing your keyboard a few times in CMD, you'll end up with the same error. The question I've linked is the same answer, just replace _node_ for pip and/or python. – HPierce Nov 12 '17 at 15:51

3 Answers3

3

Some information from official python documentation page

  • pip is the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers.

So, when you install Python 3.6 pip already bundled. pip is not windows executable, so you should use pip by following command

python -m pip install SomePackage
Vico
  • 108
  • 2
  • 14
  • I actually tried that too. C:\Users\Nirvan Mahat>python -m pip install beautifulsoup4 'python' is not recognized as an internal or external command, operable program or batch file. – Nirvan Mahat Nov 12 '17 at 15:26
  • Did you check "Add to path" when installing python? FYI you can also install pip to path during installation. – whodini9 Nov 12 '17 at 15:29
  • Make sure to **re open** your command prompt after installation. Because command prompt wouldn't recognize updated `PATH` in command prompt that opened before installation – Vico Nov 12 '17 at 15:35
1

Possible duplicate here. In Python 3.6 documentation, it says that it is possible pip is not installed by default. The potential fix is:

python -m ensurepip --default-pip
Coloane
  • 319
  • 1
  • 4
  • 12
0

enter image description hereAdd the following to $PATH if they are not there:

C:\Users\YOUR_USER\AppData\Local\Programs\Python\Python36-32\Scripts\
C:\Users\YOUR_USER\AppData\Local\Programs\Python\Python36-32\

or Python36-64 if you installed the 64bit version.

whodini9
  • 1,434
  • 13
  • 18
  • Added the path you mentioned, still doesnt work. I installed it in 32-bit version C:\Users\Nirvan Mahat>python -m pip install beautifulsoup4 'python' is not recognized as an internal or external command, operable program or batch file. – Nirvan Mahat Nov 12 '17 at 15:37
  • That error means that Python is not in your path either. If you are not sure how to edit your PATH, I would just remove and re-install python from here https://www.python.org/downloads/ Click customize installation, on the first screen check PIP, on the second screen check Add to Enviornment Variables. – whodini9 Nov 12 '17 at 15:40
  • I just reinstalled Python with enabling the path to be python, and it worked!! Thanks – Nirvan Mahat Nov 12 '17 at 15:56
  • 1
    @NirvanMahat if case already closed please mark as answer – Vico Nov 12 '17 at 18:50