This error shows up on windows when one tries to use pip in the command prompt. To solve this error on windows, you must declare path variable by following these steps:
- Right click on My Computer or This PC
- Click on Properties
- Click on Advanced System Settings
You will find a section called system variables.
Click on Path from the list of variable and values that shows up there.
After clicking on path click edit. You will find a New button in the pop up.
Click that and paste the location of the python35 or python36 folder (The location you specified while installing python) followed by \Scripts there.
For me its C:\Users\a610580\AppData\Local\Programs\Python\Python35-32
so I type C:\Users\a610580\AppData\Local\Programs\Python\Python35-32\Scripts
Click Ok to close all windows and restart your command prompt.
I repeat - restart your command prompt.
Everything should now be working fine! Make sure you don’t disturb anything else in the path variable and follow the aforementioned steps exactly.
Alternatively you can watch this video.
Answer from Haris Ali Khan on Stack OverflowThis error shows up on windows when one tries to use pip in the command prompt. To solve this error on windows, you must declare path variable by following these steps:
- Right click on My Computer or This PC
- Click on Properties
- Click on Advanced System Settings
You will find a section called system variables.
Click on Path from the list of variable and values that shows up there.
After clicking on path click edit. You will find a New button in the pop up.
Click that and paste the location of the python35 or python36 folder (The location you specified while installing python) followed by \Scripts there.
For me its C:\Users\a610580\AppData\Local\Programs\Python\Python35-32
so I type C:\Users\a610580\AppData\Local\Programs\Python\Python35-32\Scripts
Click Ok to close all windows and restart your command prompt.
I repeat - restart your command prompt.
Everything should now be working fine! Make sure you don’t disturb anything else in the path variable and follow the aforementioned steps exactly.
Alternatively you can watch this video.
According to the pip documentation, rather than running pip directly, you just need to type
py -m pip
in your Python terminal. Then you will see a list of things you can do.

'pip' is not recognized as an internal or external command, operable program or batch file.
'pip' is not recognized as an internal or external command
visual studio code - The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. - VSCode Python - Stack Overflow
pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program.
Videos
Hello!
I recently installed Python version 3.12 and I am having some trouble with pip in the command prompt (Windows 10 pro). When I type the command "py --version" it tells me that Python version 3.12.0 is installed. I have added the Python folder in general and the Python folder "scripts" to PATH through Advanced System Settings>Environmental Variables> and then added it to System Variables and variables for my user profile. When I close and re-open the command prompt and type "pip install python-docx pyautogui" I get the "'pip' is not recognized as an internal or external command, operable program or batch file." error message. I don't know what to do from here.
Additionally, I followed steps 1-3 on this website (https://phoenixnap.com/kb/install-pip-windows), and it went well according to the website. However, I am still getting the error in the title of this post when trying to utilize pip. Thank you all for your help!
I have tried everything I have repaired and reinstalled BUT I CAN'T GET IT TO FUCKING WORK
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.
For Windows, when you install a package, you type:
python -m pip install [packagename]
Or in some cases:
py -m pip install [packagename]
Add the scripts folder to PATH
C:\Users\hp\AppData\Local\Programs\Python\Python39\Scripts
or
C:\Python39\Scripts
(depending on how you have installed python locate and add python/scripts folder)
Just use on the terminal:
py -m pip install
followed by the library you want to install. It tends to work.