How To Install Python on Windows and Linux

This section just teaches you how to install python on Windows, Linux, and Mac OS systems.

Initially set up a local python operating environment. Python can be applied to multiple platforms. You can enter "python" in the terminal to check whether the operating environment is successfully constructed.

1. 1. Install Python on Windows

(1) Download Python Download the latest version of the Python installer. Choose Windows installer 32-bit or 64-bit according to your system.
!!! Python 3.9 requires minimum Windows 8.1 version system, win7 system can download Python 3.8 or lower version python installation tutorial
how to install python on Windows, Linux
After downloading, double-click the installation package and click "Next" to install using the default settings.

(2) Set environment variables on Windows

Right-click on "Computer" => Click on "Properties" => Click on "Advanced System Settings" => Select "System Variables" => Find the path under the window and double-click => Add C:Program Files (x86)python3; to Just tail C:Program Files (x86)python3; is the installation path of Python, if your installation path is other, please refer to your installation path For the detailed process, please refer to "Detailed Tutorial for Installing Python under Windows"
"C:Program Files (x86)python3" is the installation path of mine, you can change your installation path

2. Install Python on Linux

(1) Compile and install

Visit the official website: download the latest source code package, the demo is version 3.9.1,also you can download it with linux command
cd ~
tar -xvf Python-3.9.1.tgz
cd Python-3.9.1
make instll
If there are no errors in the whole process, congratulations, you have completed the installation.

(2) Set environment variables on Linux

Type in the bash shell (Linux) terminal
export PATH="$PATH:/usr/local/bin/python" 
注意:/usr/local/bin/python is the actual installation directory of python. If you compile and install it with an another directory, replace it with the actual directory.

3. Install Python on Mac OS

You can download the latest version and install it on

4. Test the installation

If you enter python in a terminal such as Windows or Linux, and you can see the following similar information, congratulations!!
How To Install Python on Windows and Linux
python windows installation
After installing the Python environment, you can run Python programs.