Home >Backend Development >Python Tutorial >Perfect solution to python2.7's inability to use pip

Perfect solution to python2.7's inability to use pip

php中世界最好的语言
php中世界最好的语言Original
2018-04-09 10:26:307085browse

This time I bring you the perfect solutionpython2.7 cannot use pip, solve the problem that python2.7 cannot use pipWhat are the precautions, the following is a practical case, let’s take a look one time.

1. Under Python IDLE, we enter the following code

from urllib import urlopen【回车】
data = urlopen('http://peak.telecommunity.com/dist/ez_setup.py')【回车】
open('ez_setup.py','wb').write(data.read())【回车】
exit【回车】

and then it will appear:

Use exit() or Ctrl-Z plus Return to exit2.

2. Under the calculated cmd program, switch to your own Installation directory python environment, execute python ez_setup.py

3. In this way, easy_install is successfully installed. easy_install is under the directory C:\Python27\Scripts.

4. Under cmd, switch to the directory C:\Python27\Scripts and run the easy_inatall pip command.

5. Configure C:\Python27\Scripts to the environment variable;

6. After pip is installed successfully, execute pip under cmd to see the successful installation result. .

7. Then you can use pip to install various plug-ins, such as pip install requests.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related matters on the PHP Chinese website article!

Recommended reading:

The object of diff is the virtual dom

Detailed explanation of the steps for using JS’s EventEmitter

The above is the detailed content of Perfect solution to python2.7's inability to use pip. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn