Django App Engine can't find antlr3 module

2019-07-28 14:41发布

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?

2条回答
叛逆
2楼-- · 2019-07-28 15:20

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

查看更多
Ridiculous、
3楼-- · 2019-07-28 15:23

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

Did you try this?

查看更多
登录 后发表回答