我按照教程在我的 GAE 项目中启用 i18n 功能:
http://webapp-improved.appspot.com/tutorials/i18n.html
但是,在我 easy_install babel 之后,由于以下错误,我无法访问我的 GAE:
File "/Users/myname/Developer/GAE/project/webapp2_extras/i18n.py", line 16, in <module>
import babel
ImportError: No module named babel
我试图在我的命令行中加载它:
$ python2.7
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import babel
>>>
它工作正常!
我怀疑问题是GAE无法加载库,但我不知道如何解决。
请帮忙,谢谢!
我的工作环境是 MaxOSX Lion,Python2.7,GAE 1.6.6。