Python's environment variables
environment variable | clarification |
---|---|
PYTHONSTARTUP | Files executed at interactive startup (no default) |
PYTHONPATH | ':' - A list of delimited directories prefixed by the default module search path. Result. |
PYTHONHOME | Alternate <prefix> directories (or <prefix>:<exec_prefix>). The default module search path is <prefix>/. |
PYTHONCASEOK | Ignore case in import statements (Windows). |
PYTHONIOENCODING | For encoding in stdin/stdout/stderr |
PYTHONHASHSEED | If this variable is set to random, the effect is the same as the -R option: the seed is set using a hash with random values for str, bytes and datetime objects. It can also be set to an integer in the range [0, 4294967295] to get a hash with a predictable seed. |
Setting Python's environment variables works:
When the system is asked to run a program without being told the full path where the program is located, the system should go to the path specified in path in addition to looking for this program under the current directory. Users can set environment variables to run processes better.
If you install Python without setting environment variables:
- 1, if you do not set the environment variable in the cmd command line to knock python will prompt can not find python command.
- 2、If you don't set the environment variable to install Python's third-party packages, you will be prompted to find the corresponding python version path.
- 3, if you do not set the environment variable with pip install install package will not find the path.
Environment variables:
Environment variables (environment variables) generally refers to some parameters used in the operating system to specify the operating environment of the operating system, such as: temporary folder location and the location of the system folder.
An environment variable is an object with a specific name in the operating system that contains information that will be used by one or more applications.