Django App Engine找不到antlr3模块 [英] Django App Engine can't find antlr3 module

查看:107
本文介绍了Django App Engine找不到antlr3模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个Django应用程序来运行GAE,并且使用on_production_server测试在settings.py中的dev与production设置之间进行选择。

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.

然而,当我运行

python manage.py runserver

我得到:

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

我尝试将以下内容添加到settings.py:

I tried adding the following to settings.py:

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

这行直到.profile的最后:

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?

推荐答案

在遇到同样问题的时候看到这个问题。通过从 Here 安装antlr 3.1.1 python运行时来解决它。

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

这篇关于Django App Engine找不到antlr3模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆