Django - ImportError: No module named apps
<p>I am trying out the Django tutorial on the djangoproject.com website, but when I reach the part where I do the first "makemigrations polls" I keep getting this error:</p>

<blockquote>
  <p>ImportError: No module named apps</p>
</blockquote>

<pre>
Traceback (most recent call last):
  File "manage.py", line 22, in 
    execute_from_command_line(sys.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 312, in execute
    django.setup()
  File "/Library/Python/2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/Library/Python/2.7/site-packages/django/apps/config.py", line 112, in create
    mod = import_module(mod_path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
</pre>

<p>How can I resolve this error?</p>

<p>Your problem is that your Django version does not match the version of the tutorial.</p>

<p>In Django 1.9+, the startapp command automatically creates an app config class, so <a href="https://docs.djangoproject.com/en/1.9/intro/tutorial02/#activating-models" rel="nofollow">the tutorial</a> asks you to add <code>polls.apps.PollsConfig</code> to <code>INSTALLED_APPS</code>.</p>

<p>For Django 1.8 and earlier, <a href="https://docs.djangoproject.com/en/1.8/intro/tutorial01/#activating-models" rel="nofollow">the tutorial</a> asks you to add <code>polls</code> to <code>INSTALLED_APPS</code>. If you add <code>polls.apps.PollsConfig</code> instead, you will get an import error, unless you create the <code>PollsConfig</code> manually.</p>

python django python-2.7 django-models