pip is used to conveniently manage third-party packages of Python. Since I only had a taste of Python before, I used python(x,y), but this does not mean that you can find any package you want to use. , so I uninstalled python(x,y) and reinstalled Python2.7.5, ready to try using pip to download the desired package.
After the python installation is completed, you can use the "python" command under cmd, cd all the way to the root directory of easy_install.exe. (Recommended learning: Python video tutorial)
It needs to be emphasized here that the default path of cmd starts from "C:\Users\ASUS>". If you want to go to D Drive E and drive F are convenient. Taking drive E as an example, just enter "E:" directly. But how to move to drive C?
One of the commands used here is "cd\", as follows:
Cd all the way to the location of easy_install.exe and execute the command "easy_install.exe pip":
Then a series of pip-related files will appear in the Scripts folder, including pip. exe.
Also add the path of pip.exe to the environment variable PATH.
Enter "pip" under cmd. If the "pip" command can be recognized, it means that the pip installation is successful.
That is to say, the following screen will appear:
The above is the detailed content of How to install pip in python2. For more information, please follow other related articles on the PHP Chinese website!