‘pip’ is not recognized as an internal or external command

Total
0
Shares

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

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

C:Python34> python get-pip.py
Requirement already up-to-date: pip in c:python34libsite-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> libsite-packagespip install Django
'libsite-packagespip' is not recognized as an internal or external command,
operable program or batch file.

What could be causing this?

This is what I get when I type in echo %PATH%:

C:Python34>echo %PATH%
C:Program FilesImageMagick-6.8.8-Q16;C:Program Files (x86)InteliCLS Client
;C:Program FilesInteliCLS Client;C:Windowssystem32;C:Windows;C:WindowsS
ystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)
Windows LiveShared;C:Program Files (x86)IntelOpenCL SDK2.0binx86;C:Progr
am Files (x86)IntelOpenCL SDK2.0binx64;C:Program FilesIntelIntel(R) Mana
gement Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine C
omponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine Components
DAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:P
rogram Files (x86)nodejs;C:Program Files (x86)Herokubin;C:Program Files (x
86)gitcmd;C:RailsInstallerRuby2.0.0bin;C:RailsInstallerGitcmd;C:RailsIn
stallerRuby1.9.3bin;C:UsersJaviAppDataRoamingnpm

Solution

You need to add the path of your pip installation to your PATH system variable. By default, pip is installed to C:Python34Scriptspip (pip now comes bundled with new versions of python), so the path “C:Python34Scripts” 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:Python34Scripts"

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.

Source: StackOverflow.com

Leave a Reply

Your email address will not be published. Required fields are marked *