: am : am :\code\py xdir __pycache__ : am script py __pycache__ script cpython- pyc cruciallyunder the model used in and laterimporting the same file with different python creates different byte code fileinstead of overwriting the single file as done by the pre- model--in the newer modeleach python version and implementation has its own byte code filesready to be loaded on the next program run (earlier pythons will happily continue using their scheme on the same machine) :\code\py xc:\python \python import script hello world ^ :\code\py xdir __pycache__ : pm : am script cpython- pyc script cpython- pyc python ' newer byte code file model is probably superioras it avoids recompiles when there is more than one python on your machine-- common case in today' mixed / world on the other handit is not without potential incompatibilities in programs that rely on the prior file and directory structure this may be compatibility issue in some tools programsfor instancethough most well-behaved tools should work as before see python ' "what' new?document for details on potential impacts also keep in mind that this process is completely automatic--it' side effect of running programs--and most programmers probably won' care about or even notice the differenceapart from faster startups due to fewer recompiles the module search path as mentioned earlierthe part of the import procedure that most programmers will need to care about is usually the first--locating the file to be imported (the "find itpartbecause you may need to tell python where to look to find files to importyou need to know how to tap into its search path in order to extend it in many casesyou can rely on the automatic nature of the module import search path and won' need to configure this path at all if you want to be able to import userdefined files across directory boundariesthoughyou will need to know how the search path works in order to customize it roughlypython' module search path is composed of the concatenation of these major componentssome of which are preset for you and some of which you can tailor to tell python where to look modulesthe big picture