The role of setting Python environment variables:
When the system is asked to run a program without telling it the full path where the program is located, the system will search in the current directory except In addition to this program, you should also go to the path specified in path to find it. Users can better run processes by setting environment variables.
If you install Python without setting environment variables:
1. If you do not set environment variables and type python on the cmd command line, you will be prompted that the python command cannot be found.
2. If you do not set the environment variable when installing the third-party package of Python, you will be prompted that the corresponding python version path cannot be found.
3. If you do not set the environment variables and use pip install to install the package, you will not be able to find the path.
Environment variables:
Environment variables (environment variables) generally refer to some parameters used in the operating system to specify the operating environment of the operating system, such as: temporary folder location and system folder location wait.
An environment variable is an object with a specific name in the operating system, which contains information that will be used by one or more applications.
For more Python related technical articles, please visit thePython Tutorialcolumn to learn!
The above is the detailed content of What is the use of setting environment variables in python. For more information, please follow other related articles on the PHP Chinese website!