Perform a view of the import sys; print(sys.path)
Python search path and make sure your module is in the Python search path
search paths and packages for Python (package)
Python's search path is actually a list, it is the guide into the module, Python will automatically find the path to search this list, if the path exists to import the module file is imported successfully, otherwise the import failed:
>>>ImportSYS>>>sys.path["','C:\\python33\\lib\\idlelib','C:\\windows\\system32\\python33.zip','C:\\python33\\dlls','C:\\python33\\lib','c:\\python33','c:\\python33\\lib\\site-packages']>>> Sys.path.append ('E:\\python')>>>sys.path["','C:\\python33\\lib\\idlelib','C:\\windows\\system32\\python33.zip','C:\\python33\\dlls','C:\\python33\\lib','c:\\python33','c:\\python33\\lib\\site-packages','E:\\python']>>>
When installing third-party modules, if they are not installed in a standard manner, in order to be able to reference (import) These modules, the installation path of these modules must be added to Sys.path, in the following ways:
The simplest way to do this is to add a path profile under a directory in Sys.path, most commonly in the .../site-package/directory. The path profile extension is ". PTH", where each row contains a separate path that is added to the Sys.path list (verified). The path in ". PTH" can be either an absolute or a relative path, relative to the path that contains the ". PTH" file.
The ultimate solution: Reinstall Python
Python has installed a package, but the module in the import package is wrong without this package