When you import a module ,Python The search order of the parser for the module location is :
● Current directory
● If not in the current directory ,Python Search in shell Variable PYTHONPATH Every directory under .
● If you can't find ,Python Will look at the default path .UNIX Next , The default path is /usr/local/lib/python/.
The module search path is stored in system Modular sys.path variable . Variable contains the current directory ,PYTHONPATH And the default directory determined by the installation process