What is the difference between $PATH variable, sys.path and os.environ? I understand that they both serve as paths where python searches packages. But it\'d be nice to have
sys.path
Is a list of strings that specifies the search path for modules. Initialized from the environment variable PYTHONPATH, plus an installation-dependent default.
os.environ
Is a mapping object representing the string environment. For example, environ['HOME'] is the pathname of your home directory (on some platforms), and is equivalent to getenv("HOME") in C.
Environment variable PATH
Specifies a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting.