Home  >  Article  >  Backend Development  >  Detailed steps to install Python and pip (windows environment)

Detailed steps to install Python and pip (windows environment)

Y2J
Y2JOriginal
2017-05-05 17:14:011227browse

This article hopes to provide a fool-like tutorial that will enable readers to successfully install Python and pip. Friends who need it can refer to

This article hopes to provide a fool-like tutorial that will enable readers to successfully install Python and pip.

The first step is to install Python. The version chosen by the blogger is the latest version 3.4.2. Python installation under windows is generally installed through software installation packages rather than command lines, so we must first download the latest Python installation package from the official Python homepage. The download address is: www.python.org/downloads/

After the download is completed, keep clicking Next and it is OK. After the installation is complete, open the console and enter "Python". We can see the following effect:

The reason is very simple, because python The .exe file is in the Python directory, and we have not set the environment variables yet. So we need to add environment variables manually: Right-click My Computer -> Properties -> Click Advanced System Settings -> Click Environment Variables -> Click PATH -> Add us at the end Python installation path -> Click OK. Using a picture to represent it is:

The problem that needs to be paid attention to in this process is that when adding the PATH path, a semicolon must be added at the end. Now we enter "Python" in the browser again, and we can directly enter and exit commands on the console:

The second step is to install pip. We also need to download it from Python’s official website. The download address is: https://pypi.python.org/pypi/pip#downloads:

 

After the download is completed, extract it to a folder, use the CMD console to enter the decompression directory, enter:

python setup.py install

After installation, we directly enter pip on the command line, it will also show that 'pip' is not an internal command. Nor is it a runnable program. Because we haven't added environment variables yet.

According to the method of adding environment variables introduced before, we add at the end of PATH:

C:\Python34\Scripts;

Now we have fully installed pip:

The third step is to install some Python packages, such as the Tornado web framework:

[Related recommendations]

1. Python Free Video Tutorial

2. Python Learning Manual

3. 马哥education python basic grammar complete explanation video

The above is the detailed content of Detailed steps to install Python and pip (windows environment). 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