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
!!! Python 3.9 requires minimum Windows 8.1 version system, win7 system can download Python 3.8 or lower version python installation tutorial
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:https://www.python.org/downloads/source/
download the latest source code package, the demo is version 3.9.1,also you can download it with linux command
tar -xvf Python-3.9.1.tgz
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
注意：/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
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!!
After installing the Python environment, you can run Python programs.