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?
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
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"
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.
For me command:
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
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
set Path =
For windows when you install a package you type:
python -m pip install [packagename]
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.
Try going to windows powershell or cmd prompt and typing:
python -m pip install openpyxl
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.
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
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.
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;”
make use of these resources.this will solve issue for you
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)
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)
I had this same issue. You just need to go to your
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.
In latest version python 3.6.2 and above it is available in
C:\Program Files (x86)\Python36-32\Scripts
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.
I have just installed python 3.6.2.
I got the path as
In Windows, open cmd and find the location of PYTHON_HOME using
now add this location to your Environment PATH using:
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
Yo can try
pip3, something like:
C:> pip3 install pandas
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”)