Forums

Need help on Python version and Django error

... I am trying to follow the tutorial on Django (https://help.pythonanywhere.com/pages/DjangoTutorial)

I followed all the steps however when I inserted the instruction: python ./manage.py syncdb

, I got an error saying that there was no "No module named engapp" which is exactly the one I've created in on of the previous steps....

along with the error message the python version mentioned is 2.7 which does not corresponds to the one I choose on the web tab.

############retrieving message###############
Traceback (most recent call last):
  File "./manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 123, in create
    import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named engapp
###########

Can please someone help one this?

Thank you, Ana

[edit by admin: formatting]

Hi Ana -- that tutorial is probably too old to use, I recommend you switch over to the Django Girls one I mentioned in my other forum post, or follow the official Django tutorial using the hints on how to do it from PythonAnywhere on this help page.