'pip' is not an internal or external command, nor is it an executable program or batch file solution

Enter pip in the Dos command window and encounter:
'pip' is not an internal or external command, nor is it an executable program or batch file.

This is the situation in the following figure:
Insert picture description here

The solution-add environment variables

The steps are as follows:
1. Find the location of python installation and find the Scripts folder. Hold down the Shift key, right-click in the Scripts folder, and select "Copy as Path".
2. Right-click on My Computer and select Properties -> Select Advanced System Settings.
Insert picture description here
3. Click Environment Variables.
Insert picture description here
4. In the system variables below, select Path.
Insert picture description here
5. Click New.
Insert picture description here
6. Paste the path just copied into the box.
Insert picture description here
Finally, OK -> OK, reopen cmd.
pip is ready to use.

Guess you like

Origin blog.csdn.net/qq_46620129/article/details/112209554