from google.appengine.ext.webapp.util import run_wsgi_app ImportError: No module named google.appengine.ext.webapp.util

137 views
Skip to first unread message

Revanth via StackOverflow

unread,
Jun 12, 2015, 4:32:09 AM6/12/15
to google-appengin...@googlegroups.com

I am a newbie to GAE. I am using eclipse +Pydev. I am getting this error

    from google.appengine.ext.webapp.util import run_wsgi_app
    ImportError: No module named google.appengine.ext.webapp.util

Here is what I am importing

import cgi
import webapp2
from google.appengine.ext.webapp.util import run_wsgi_app
import MySQLdb
import os
import jinja2

I am using UBUNTU. I have searched this error in stackoverflow and I did not find any convincing answers.

I have even downloaded the appengine and reinstalled again and again but thats of no use.

https://cloud.google.com/appengine/downloads

Please provide me with a correct answer like links etc. DO NOT reply with you can find about this on this link etc.. I have searched for many links on the net and I couldn't find the convincing explanation to the problem.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/30798677/from-google-appengine-ext-webapp-util-import-run-wsgi-app-importerror-no-module

SillyWilly via StackOverflow

unread,
Jun 13, 2015, 7:52:09 PM6/13/15
to google-appengin...@googlegroups.com

You need to make sure the App Engine SDK you downloaded is in your Python path. You can check what python thinks its path is by running python interactively:

$ python
>>> import sys
>>> sys.path
['', '/Library/Python/2.7/site-packages/mock-1.0.1-py2.7.egg', '/usr/local/lib/wxPython-2.9.5.0/lib/python2.7/site-packages', '/usr/local/lib/wxPython-2.9.5.0/lib/python2.7/site-packages/wx-2.9.5-osx_cocoa', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Library/GoogleCorpSupport/Python', '/usr/local/lib/wxPython-2.9.5.0/lib/python2.7']

Alternatively you can add the SDK to the python path at runtime. For example, if you downloaded and unzipped to /home/username/google_appengine you could modify your python path in your script:

sys.path.append('/home/username/google_appengine')
import dev_appserver
dev_appserver.fix_sys_path()

from google.appengine.ext.webapp.util import run_wsgi_app


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/30798677/from-google-appengine-ext-webapp-util-import-run-wsgi-app-importerror-no-module/30824706#30824706
Reply all
Reply to author
Forward
0 new messages