ImportError: No module named google.appengine.api

548 views
Skip to first unread message

EJ Kowal

unread,
Jun 14, 2016, 11:24:30 PM6/14/16
to Google App Engine
I am having some issues with running python manage.py collectstatic. I get this error now:

Traceback (most recent call last):
  File "manage.py", line 12, in <module>
    execute_from_command_line(sys.argv)
  File "lib/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "lib/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "lib/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "lib/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "lib/django/contrib/admin/apps.py", line 22, in ready
    self.module.autodiscover()
  File "lib/django/contrib/admin/__init__.py", line 23, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "lib/django/utils/module_loading.py", line 74, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/edk/workspace/completerecipes/core/admin.py", line 13, in <module>
    from core.forms import RecipeCategoryForm
  File "/home/edk/workspace/completerecipes/core/forms.py", line 9, in <module>
    from google.appengine.api import memcache
ImportError: No module named google.appengine.api


Everything I have tried so far has been to no avail, I am not sure exactly what I need to do to be able to run collectstatic.

Thanks for reading!

Eddie

Christian F. Howes

unread,
Jun 15, 2016, 3:50:38 PM6/15/16
to Google App Engine
i am not familiar with the tools you mention, are the GAE tools?  are you running them in the GAE environment?  if you are trying to invoke tools from the command line, please be sure that your python path includes the google tooling, you might want to setup a virtualenv for this.  when i setup my virtualenv i did:

GAESDK=[PATH_TO_YOUR_GAE_SDK]
add2virtualenv $GAESDK/lib/webapp2-2.5.2/
add2virtualenv $GAESDK/lib/webob-1.2.3/
add2virtualenv $GAESDK/lib/yaml-3.10/
add2virtualenv $GAESDK/lib/python-gflags/
add2virtualenv $GAESDK

plus a few others that were specific to my project.
Reply all
Reply to author
Forward
0 new messages