What is PYTHONPATH?

Discussion RoomCategory: Interview QuestionWhat is PYTHONPATH?
Ashly asked 6 years ago

PYTHONPATH is an environment variable, much like PATH. You can get a list of environment variables on UNIX-like operating systems by running the ‘env’ command. It’s available in the Properties of My Computer in Windows. PYTHONPATH is similar to PATH in another way, in that it defines a search path. However, unlike PATH (which tells the operating system which directories to look for executable files in), PYTHONPATH is used by the Python interpreter to find out where to look for modules to import

Scroll to Top