Install Python on Windows and configure environment variables

Currently, there are two versions of Python, one is version 2.x and the other is version 3.x, these two versions are incompatible. Since version 2.x is only officially maintained until 2020, version 3.x is used as an example, but the installation method and environment variable configuration method of version 2.x and version 3.x are exactly the same, so please rest assured.

Download the Python installation package

Go to the Python official website www.python.org, click the python3.6.4 version in the right half of the "Downloads" drop-down menu to download it, and it will automatically download the 32-bit version. (3.6.4 is the latest version for 3.x; 2.7.13 is the latest version for 2.x). Since the 3.x version is very popular now, it is recommended to use the latest version 3.6.4.


If you want to download 64-bit or other versions, you can directly click Windows in the list to jump to the following list, and you can choose your favorite version. After the download is complete, it is a file with an exe suffix, and you can double-click to install it.


start installation



After the installation is complete , directly enter " cmd " in the search to bring up the command line, or the shortcut key " win+R "

Enter "python3" in the terminal


Environment configuration
1. Click "My Computer", right-click and select "Properties"
2. Select "Advanced System Settings" --> Select "Environment Variables" --> Select "Path" in "System Variables", then click " Edit"-->Click "Edit Text"

--> Select "Environment Variables" --> Select "Path" in "System Variables", then click "Edit" --> Then click "Edit Text"


-->Select "Path" in "System Variables", then click "Edit" --> Then click "Edit Text"


--> Click "Edit Text" again


3. In the "variable value" column, just copy the python path you installed. The path I installed is "D:\Python27"


Note: When copying the path "C:\Python27", add a semicolon ";" in front of it. Also note that the semicolon must be the semicolon in the English input method.


4. Configuration is complete: win+R , or cmd to call up the command line


Enter the command " python ", you can have the relevant display, complete!



Install the pip package management tool

See the blog for details: https://blog.csdn.net/catstarxcode/article/details/79724764





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325598776&siteId=291194637