Django App Engine can't find antlr3 module

我们两清 提交于 2019-12-11 09:12:00

问题


I'm trying to set up a Django app to run on GAE, and am using the on_production_server test to choose between dev vs. production settings in settings.py.

However, when I run

python manage.py runserver

I get:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    import settings
  File "/home/guillaume/myproject/settings.py", line 10, in <module>
    from djangoappengine.utils import on_production_server, have_appserver
  File "/home/guillaume/myproject/djangoappengine/utils.py", line 18, in <module>
    'Error was: %s' % e)
Exception: Could not get appid. Is your app.yaml file missing? 
Error was: No module named antlr3

I tried adding the following to settings.py:

import sys
sys.path.append('/usr/local/google_appengine/lib/')

And this line to the very end of .profile:

PATH="$PATH:/usr/local/google_appengine/"

But neither gets rid of the error. I'm really new to working with paths so I'm kind of fumbling around blindly here. Can anyone help?


回答1:


Python2.5v or 2.7v? And what about GAE SDK version?

Did you try this?




回答2:


Saw this question while having the same problem. Solved it by installing antlr 3.1.1 python runtime from Here.



来源:https://stackoverflow.com/questions/11806237/django-app-engine-cant-find-antlr3-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!