search

Home  >  Q&A  >  body text

python - Django cannot find error: The module cannot be found, but it is in the file

python manage.py runserver

Error ImportError: No module named mns.account

I have a module here, but I can’t find the problem! ! !

三叔三叔2703 days ago1045

reply all(2)I'll reply

  • 黄舟

    黄舟2017-07-05 10:29:16

    Either use the directory where mns is located as the path for python to search for modules (suitable for development); or use relative paths to import modules in the same project (not recommended)

    reply
    0
  • 迷茫

    迷茫2017-07-05 10:29:16


    The code I tested on git, this can be run on the server side, but errors will occur locally

    reply
    0
  • Cancelreply