1if you encounter this error:
2
3ModuleNotFoundError: Cannot import name whatever
4
5with a python file called "whatever",
6then this might be cause by the following issues:
7 1. file "whatever" is not in the same folder as the current file.
8 this means that you need to place file "whatever" inside
9 the same file that gave you the import error.
10 2. library/module "whatever" is not installed.
11 if "whatever" is a third-party library/module,
12 then you need to install the library/module.
13 This is usually done with "pip install whatever",
14 but exceptions do exist that the command is not
15 the proper command to install "whatever"
16 3. if this file is in another folder, but you don't want to move it.
17 in this case, you should add this at the top of your file:
18 import sys
19 sys.path.append('path/to/file/whatever.py')
20 replace 'path/to/file' with the proper directory of "whatever.py"
21 4. you forgot to create "whatever.py"!
22 well... just remember to do that before importing.
23
24This does not include all of the possibilities. Hope this helped :D