Environment variable Configuration
Programs and executables can be in many directories, and these paths are probably not in the search path where the operating system provides executable files. The path is stored in an environment variable, which is a named string maintained by the operating system. These variables contain information about the available command-line interpreters and other programs. paths in UNIX or Windows path variable path (Unix case-sensitive, Windows is case-insensitive). in Mac OS, the setup process changes the Python installation path. If you need to reference Python in another directory, you must add a Python directory to the path.
Setting environment variables in Unix/linux
in Bash Shell (Linux): input
Export path= "$PATH:/usr/local/bin/python"
Press "Enter".
in sh or ksh shell: input
Path= "$PATH:/usr/local/bin/python"
Press "Enter".
Note: /usr/local/bin/python is the installation directory for Python.
Setting environment variables in Windows
To add a Python directory to an environment variable:
Note: D: \python27 is the installation directory for Python2.7.
Learn one python journey Python's basic operating environment