ModuleNotFoundError: no module named XY
XY is the cloned repository
The above error is a result of the import statement at the beginning of the training file.
I have cloned a repository from GitHub and installed it on my root directory. When I execute the train.py file I get the above error.
Please let me know if more details are needed for the above issue.
When you try to import a package, Python will look through
sys.pathIf you
import sysand printsys.path, you'll get a list of those directories. Note that''corresponds to the current directory, which you can get withos.getcwd().Most likely, your root directory is not on this path, and you are not launching Python from your root directory. You probably should not be putting random source folders in your root directory. You could:
PYTHONPATH(format is specified in the docs). Looks like you're on a Unix system, so it would be directory pathnames separated by a colon.