title: How to resolve cannot import name pages (django/wagtail)
body: <p>Recently I have been trying to get wagtail to work with my existing Django application. I was experiencing an error: -</p>
  
  <pre><code>ImportError: No module named wagtail
  unable to load app 0 (mountpoint='') (callable not found or import error)
  </code></pre>
  
  <p>After much troubleshooting I managed to fix this, by copying the folder wagtail from: </p>
  
  <pre><code>/usr/local/lib/python2.7/dist-packages/
  </code></pre>
  
  <p>into here</p>
  
  <pre><code>/opt/django/src/
  </code></pre>
  
  <p>Having resolved this error, I received another about a different module, and another... each time I copied the folder from   <code>/usr/local/lib/python2.7/dist-packages/</code> into <code>/opt/django/src/</code> and it eventually resolved the issues I was having and uWSGI started. </p>
  
  <p>Now when I access the homepage of my app, I receive this error</p>
  
  <pre><code>ImportError at /
  
  cannot import name pages
  
      Request Method:     GET
  Request URL:    http://example.com
  Django Version:     1.9
  Exception Type:     ImportError
  Exception Value:    
  
  cannot import name pages
  
  Exception Location:     ./wagtail/wagtailadmin/urls/__init__.py in &lt;module&gt;, line 4
  Python Executable:  /usr/local/bin/uwsgi
  Python Version:     2.7.3
  Python Path:    
  
  ['.',
   '',
   '/opt/django/src',
   '/root/.python',
   '/opt/django/env/lib/python2.7',
   '/opt/django/env/lib/python2.7/plat-linux2',
   '/opt/django/env/lib/python2.7/lib-tk',
   '/opt/django/env/lib/python2.7/lib-old',
   '/opt/django/env/lib/python2.7/lib-dynload',
   '/usr/lib/python2.7',
   '/usr/lib/python2.7/plat-linux2',
   '/usr/lib/python2.7/lib-tk',
   '/opt/django/env/local/lib/python2.7/site-packages',
   '/opt/django/env/lib/python2.7/site-packages']
  </code></pre>
  
  <p>I have checked the file referenced (<code>./wagtail/wagtailadmin/urls/__init__.py</code>) and it looks like this: </p>
  
  <pre><code>from django.conf.urls import url, include
  from django.views.decorators.cache import cache_control
  
  from wagtail.wagtailadmin.urls import pages as wagtailadmin_pages_urls
  from wagtail.wagtailadmin.urls import collections as wagtailadmin_collections_urls
  from wagtail.wagtailadmin.urls import password_reset as wagtailadmin_password_reset_urls
  from wagtail.wagtailadmin.views import account, chooser, home, pages, tags, userbar
  from wagtail.wagtailadmin.api import urls as api_urls
  from wagtail.wagtailcore import hooks
  from wagtail.utils.urlpatterns import decorate_urlpatterns
  from wagtail.wagtailadmin.decorators import require_admin_access
  </code></pre>
  
  <p>The offending line is the first wagtail 'from' ...</p>
  
  <blockquote>
    <p>from wagtail.wagtailadmin.urls import pages as wagtailadmin_pages_urls</p>
  </blockquote>
  
  <p>How can I resolve this error?</p>