ModuleNotFoundError

ModuleNotFoundError will occur when calling modules at different levels. The program finds the module by searching in the order in sys.path, maybe your module has not been added to the environment variable, you can try to add it manually

import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)

Guess you like

Origin blog.csdn.net/kairui_guxiaobai/article/details/106443175