No module named 'ecommerce.store' in django

Solution 1:

from ecommerce.store.models import Product will find package ecommerce from project root dir, this will find the subdirectory ecommerce not root directory ecommerce, you can use absolute import:

from store.models import Product

or just use relative import(recommended way):

from .models import Product