Home » Python » 'pip' is not recognized as an internal or external command

'pip' is not recognized as an internal or external command

Posted by: admin November 1, 2017 Leave a comment

Questions:

I’m running into a weird error trying to install Django on my computer.

This is the sequence that I’ve typed into my command line:

C:\Python34>python get-pip.py
Requirement already up-to-date: pip in c:\python34\lib\site-packages
Cleaning up...

C:\Python34>pip install Django
'pip' is not recognized as an internal or external command,
operable program or batch file.

C:\Python34>lib\site-packages\pip install Django
'lib\site-packages\pip' is not recognized as an internal or external command,
operable program or batch file. 

What could be causing this?

EDIT ___________________

As requested this is what I get when I type in echo %PATH%

C:\Python34>echo %PATH%
C:\Program Files\ImageMagick-6.8.8-Q16;C:\Program Files (x86)\Intel\iCLS Client\
;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\S
ystem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\
Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK.0\bin\x86;C:\Progr
am Files (x86)\Intel\OpenCL SDK.0\bin\x64;C:\Program Files\Intel\Intel(R) Mana
gement Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine C
omponents\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components
\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\P
rogram Files (x86)\nodejs\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x
86)\git\cmd;C:\RailsInstaller\Ruby2.0.0\bin;C:\RailsInstaller\Git\cmd;C:\RailsIn
staller\Ruby1.9.3\bin;C:\Users\Javi\AppData\Roaming\npm
Answers:

You need to add the path of your pip installation to your PATH system variable. By default, pip is installed to C:\Python34\Scripts\pip (pip now comes bundled with new versions of python), so the path “C:\Python34\Scripts” needs to be added to your PATH variable.

To check if it is already in your PATH variable, type echo %PATH% at the CMD prompt

To add the path of your pip installation to your PATH variable, you can use the Control Panel or the setx command. For example:

setx PATH "%PATH%;C:\Python34\Scripts"

Note:
According to the official documentation, “[v]ariables set with setx variables are available in future command windows only, not in the current command window”. In particular, you will need to start a new cmd.exe instance after entering the above command in order to utilize the new environment variable.

Thanks to Scott Bartell for pointing this out.

Questions:
Answers:

For me command:

set PATH=%PATH%;C:\Python34\Scripts

worked immediately (try after echo %PATH% and you will see that your path has the value C:\Python34\Scripts).

Thanks to: https://stackoverflow.com/a/9546345/1766166

Questions:
Answers:

also, the long method – it was a last resort after trying all items above:

c:\python27\scripts\pip.exe install [package].whl

this after cd in directory where the wheel is located

Questions:
Answers:

set Path = %PATH%;C:\Python34\;C:\Python27\Scripts

Source

Questions:
Answers:

For windows when you install a package you type:

python -m pip install [packagename]

Questions:
Answers:

I realize this is an old question, but I was having the same problem just now. After adding the proper folder (C:\Python33\Scripts) to the path, I still could not get pip to run. All it took was running pip.exe install -package- instead of pip install -package-. Just a thought.

Questions:
Answers:

Try going to windows powershell or cmd prompt and typing:

python -m pip install openpyxl

Questions:
Answers:

Even I’m new to this but, C:\Python34\Scripts>pip install django ,worked for me. The path should be set as where the Script folder of Python installation is i.e.C:\Python34\Scripts. I suppose its because django is a framework which is based on python that’s why this directory structure has to be maintained while installing.

Questions:
Answers:

As per Python 3.6 Documentation

It is possible that pip does not get installed by default. One
potential fix is:

python -m ensurepip --default-pip

Questions:
Answers:

Go to control Panel >> Uninstall or change Program and double click on Python XXX to modify install. Make sure PIP component is checked and install.

enter image description here

Questions:
Answers:

refer the ENV path setting up :http://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/
make sure the env path is added correctly, for 2.7-“c:\Python27\Scripts;”

refer Get Pip section : http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/

make use of these resources.this will solve issue for you

Questions:
Answers:

Small clarification:in “windows 7 64 bit PC” after adding “…Python34\Scripts” to path variable, “pip install pygame” didn’t work for me.

So, I checked “…Python34\Scripts” folder, it didn’t have”pip” it had “pip3” and “pip3.4”. So I ran this “pip3.4 install pygame …. .whl “.. It worked.

(Further open command window on the same folder where you have the downloaded pygame…whl file)

Questions:
Answers:

I continued to recieve this error after correcting my PATH.

If your codebase requires that you have an earlier version of Python (2.7 in my case), it may have been a version prior to the existence of pip.

It’s not very canonical but installing a more recent version worked for me. (I used 2.7.13)

Questions:
Answers:

I had this same issue. You just need to go to your

C:\Python27\Scripts

and add it to environment variables. After path setting just run pip.exe file on C:\Python27\Scripts and then try pip in cmd. But if nothing happens try running all pip applications like pip2.7 and pip2.exe. And pip will work like a charm.

Questions:
Answers:

In latest version python 3.6.2 and above it is available in

C:\Program Files (x86)\Python36-32\Scripts

You can add the path to our environment variable path as below enter image description here

Make sure you close your command prompt or git after setting up your path. Also you open your command prompt in administrator mode. This is example for windows 10.

Questions:
Answers:

I have just installed python 3.6.2.

I got the path as

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

Questions:
Answers:

In Windows, open cmd and find the location of PYTHON_HOME using where python,
now add this location to your Environment PATH using:

set PATH=%PATH%;<PYTHON_HOME>\Scripts

or Refer this


In Linux, open terminal and find the location of PYTHON_HOME using which python, now add the PYTHON_HOME/Scripts to the PATH variable using:

PATH=$PATH:<PYTHON_HOME>\Scripts
export PATH

Questions:
Answers:

Yo can try pip3, something like:

C:> pip3 install pandas

Questions:
Answers:

I think from Python 2.7.9 and higher pip comes pre installed and it will be in your scripts folder. So you have to add the “scripts” folder to the path. Mine is installed in C:\Python27\Scripts. Check yours to see what your path is so that you can alter the below accordingly, then Go to powershell, paste this in powershell and hit Enter key. After that, reboot and your issue will be resolved.
[Environment]::SetEnvironmentVariable(“Path”, “$env:Path;C:\Python27\Scripts”, “User”)