Typing python or pip under windows cmd is not an internal or external command

After installing python, there is no response when typing python or pip on the CMD command line of windows, which is caused by system variable problems.

solve:

1. Find the python installation directory. Note that it is not the directory under the Start Menu. This is a shortcut. If you find the shortcut, right-click the shortcut, properties, open the file location or copy the directory, this is the real python directory.

1.1 start interface to find python

image

1.2 Found the python shortcut of the menu bar

image

1.3 Right click, properties, find the target directory

image

 

2. Open the real directory of the target python

image

3. Modify system variables, right-click the properties of my computer (or this computer), or control panel\all control panel items\system, advanced system settings, increase the python path information of the path, the actual python information shall prevail, here I am It is C:\Users\Xiao\AppData\Local\Programs\Python\Python37\

The pip is C:\Users\Xiao\AppData\Local\Programs\Python\Python37\Scripts\, there are more Scripts\

image

image

The interface of other windows may be as follows, this is a semicolon; separate different environment variables. :

image

Guess you like

Origin blog.51cto.com/xxy12345/2542752