How to solve the module name conflict in python programming?
To resolve this conflict, avoid using files with the same name. If you need to access two files with the same name at the same time, you should put the two source files in a subdirectory, so that the package import directory name will make the module reference unique. As long as the peripheral package directory name is unique, you can access any module with the same name, or access two modules at the same time. Note that this problem can also occur if you accidentally use a name for your module, which happens to be the same as the name of the standard library module you need to use. This is because the local module under the program home directory (or another directory before the module path) will hide and replace the standard library module. To fix this overlap, either avoid using the same name as another module you need, or put the module in a package directory and then use Python 3. X's package relative import model (package relative import is an optional feature in version 2. x)。 In the package relative import mode, the normal import will skip the package directory, so the standard library version can be obtained, but if necessary, the local version of the module with the same name can still be selected in the special import statement at the beginning of the period.