Where are python modules stored? - Stack Overflow
stackoverflow.com › questions › 31367782Jul 12, 2015 · You'll get the location of the pyc file from where your module is being imported. You can also simply do. >>> xyz. to get the module name and the location of the module. To know about all the possible locations from where the modules are imported, use sys.path: >>> import sys >>> sys.path. This will give you the list of the locations where Python searches for a module when you do import.
Python - Modules
www.tutorialspoint.com › python › python_modulesIf all else fails, Python checks the default path. On UNIX, this default path is normally /usr/local/lib/python/. The module search path is stored in the system module sys as the sys.path variable. The sys.path variable contains the current directory, PYTHONPATH, and the installation-dependent default.